/* Profile Specific Styles - MySphere */

/* Profile Info Card */
.profile-info-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    overflow: hidden;
}

.profile-cover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 150px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 40px;
}

.profile-photo-large {
    position: absolute;
    bottom: -50px;
}

.profile-photo-large img,
.profile-avatar-xl {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.profile-avatar-xl {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 48px;
}

.profile-details {
    padding: 60px 24px 24px;
    text-align: center;
}

.profile-details h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1c1e21;
}

.profile-email {
    color: #65676b;
    font-size: 15px;
    margin-bottom: 16px;
}

.profile-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1c1e21;
    font-size: 14px;
}

.meta-icon {
    font-size: 18px;
}

.profile-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-profile-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #e4e6eb;
    background: #f0f2f5;
    color: #1c1e21;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-profile-action:hover {
    background: #e4e6eb;
}

.btn-profile-action.btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-profile-action.btn-primary:hover {
    background: #1d4ed8;
}

.btn-profile-action .icon {
    font-size: 16px;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e4e6eb;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1c1e21;
}

.btn-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #e4e6eb;
    background: #f0f2f5;
    color: #1c1e21;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: #e4e6eb;
}

.card-content {
    line-height: 1.6;
    color: #1c1e21;
}

.card-content p {
    margin-bottom: 12px;
}

.card-content textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    margin-bottom: 12px;
}

.card-content textarea:focus {
    outline: none;
    border-color: #2563eb;
}

/* Posts Header */
.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.posts-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1c1e21;
}

.posts-count {
    color: #65676b;
    font-size: 14px;
    font-weight: 500;
}

/* No Posts Card */
.no-posts-card {
    background: #fff;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.no-posts-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.no-posts-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1c1e21;
}

.no-posts-card p {
    color: #65676b;
    margin-bottom: 24px;
    font-size: 15px;
}

/* Logout Form */
.logout-form-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid #dc2626;
    background: #fff;
    color: #dc2626;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #dc2626;
    color: white;
}

.btn-logout .icon {
    font-size: 18px;
}

/* Back Button */
.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-back:hover {
    color: #1d4ed8;
}

/* Auth Form Card (for password change/reset) */
.auth-form-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.auth-form-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1c1e21;
}

.auth-form-header p {
    color: #65676b;
    font-size: 15px;
}

/* Messages */
.messages {
    margin-bottom: 24px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Form Errors */
.form-errors {
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.error-message {
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 8px;
}

.error-message:last-child {
    margin-bottom: 0;
}

/* Form Group */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1c1e21;
    margin-bottom: 8px;
    font-size: 14px;
}

.label-icon {
    font-size: 16px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.help-text {
    color: #65676b;
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.4;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn-submit {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    background: #1d4ed8;
}

.btn-submit .icon {
    font-size: 18px;
}

.btn-cancel {
    padding: 14px 24px;
    background: #f0f2f5;
    color: #1c1e21;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.btn-cancel:hover {
    background: #e4e6eb;
}

/* Auth Form Footer */
.auth-form-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e4e6eb;
    text-align: center;
}

.auth-form-footer p {
    color: #65676b;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-form-footer a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

.auth-form-footer a:hover {
    text-decoration: underline;
}

/* Suggestions Card */
.suggestions-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.suggestions-card h4 {
    font-size: 12px;
    color: #65676b;
    margin-bottom: 12px;
    font-weight: 600;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: #1c1e21;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.suggestion-item:hover {
    background: #f0f2f5;
}

.suggestion-item.active {
    background: #e7f3ff;
    color: #2563eb;
}

.suggestion-item .icon {
    font-size: 18px;
}

/* Tips */
.tip-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e4e6eb;
}

.tip-item:last-child {
    border-bottom: none;
}

.tip-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.tip-item p {
    color: #1c1e21;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Info & Stat Items */
.info-item,
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e4e6eb;
}

.info-item:last-child,
.stat-item:last-child {
    border-bottom: none;
}

.info-label,
.stat-label {
    color: #65676b;
    font-size: 13px;
    font-weight: 500;
}

.info-value,
.stat-value {
    color: #1c1e21;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

/* Full width center for unauthenticated */
.feed-center-full {
    max-width: 600px;
    margin: 0 auto;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    body {
        overflow-x: hidden;
    }

    .container {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 0 12px;
        margin: 12px auto;
        margin-bottom: 80px;
        gap: 12px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .sidebar-left,
    .sidebar-right {
        display: none !important;
    }

    .feed-center {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }

    .profile-info-card,
    .post-card,
    .auth-form-card,
    .logout-form-card,
    .no-posts-card {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .profile-cover {
        height: 120px;
        padding-bottom: 30px;
    }

    .profile-photo-large {
        bottom: -40px;
    }

    .profile-photo-large img,
    .profile-avatar-xl {
        width: 100px;
        height: 100px;
        border-width: 4px;
    }

    .profile-avatar-xl {
        font-size: 40px;
    }

    .profile-details {
        padding: 50px 20px 20px;
    }

    .profile-details h2 {
        font-size: 24px;
    }

    .auth-form-card {
        padding: 24px;
        margin: 0 auto;
    }

    .auth-form-header h2 {
        font-size: 24px;
    }

    .auth-icon {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 0 8px;
        margin: 8px auto;
        gap: 10px;
        margin-bottom: 85px;
        max-width: 100%;
    }

    .feed-center {
        width: 100%;
        max-width: 100%;
    }

    .profile-info-card,
    .post-card,
    .auth-form-card,
    .logout-form-card,
    .no-posts-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .profile-cover {
        height: 100px;
        padding-bottom: 25px;
    }

    .profile-photo-large {
        bottom: -35px;
    }

    .profile-photo-large img,
    .profile-avatar-xl {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .profile-avatar-xl {
        font-size: 32px;
    }

    .profile-details {
        padding: 45px 16px 16px;
    }

    .profile-details h2 {
        font-size: 20px;
    }

    .profile-email {
        font-size: 14px;
    }

    .meta-item {
        font-size: 13px;
    }

    .btn-profile-action {
        padding: 8px 16px;
        font-size: 13px;
    }

    .auth-form-card {
        padding: 20px;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .auth-form-header {
        margin-bottom: 24px;
    }

    .auth-form-header h2 {
        font-size: 22px;
    }

    .auth-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
    }

    .posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .no-posts-card {
        padding: 32px 16px;
    }

    .no-posts-icon {
        font-size: 48px;
    }

    .no-posts-card h3 {
        font-size: 18px;
    }
}

/* Small Mobile */
@media (max-width: 640px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .container {
        overflow-x: hidden;
        max-width: 100vw;
        width: 100%;
    }

    .main-content {
        padding: 0 8px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .feed-center {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .profile-info-card,
    .post-card,
    .auth-form-card,
    .logout-form-card,
    .no-posts-card {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    .profile-meta {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .profile-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-profile-action {
        width: 100%;
        justify-content: center;
    }

    .card-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .btn-edit {
        width: 100%;
        justify-content: center;
    }

    .auth-form-card {
        width: 100%;
        max-width: 100%;
        padding: 16px;
        margin: 0;
        box-sizing: border-box;
    }
}

/* ========================================
   MOBILE RESPONSIVE & BOTTOMNAVIGATION
   ======================================== */

/* Bottom Navigation - Hidden on Desktop */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.bottom-nav-container {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0 4px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  text-decoration: none;
  color: #65676b;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  gap: 4px;
  min-width: 0;
  max-width: 80px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  border-radius: 12px;
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav-item.active {
  color: #1877f2;
  background: rgba(24, 119, 242, 0.08);
}

.bottom-nav-item.active svg {
  stroke: #1877f2;
  transform: scale(1.1);
}

.bottom-nav-item:hover:not(.active) {
  color: #1877f2;
  background: rgba(24, 119, 242, 0.05);
}

.bottom-nav-item:active {
  transform: scale(0.95);
}

.bottom-nav-item span {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: block;
  }

  .main-content {
    padding-bottom: 80px;
  }
}

.main-content-message {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    width: 100%;
}