/* ============================================================================
   Arwah Profile & Authentication Styles - Desert Manuscript Theme
   ============================================================================ */

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-canvas) 0%, var(--color-canvas-warm) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
}

.auth-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.4'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

.auth-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.auth-card {
    background: linear-gradient(135deg, rgba(248, 246, 240, 0.98) 0%, rgba(232, 230, 223, 0.95) 100%);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(168, 155, 141, 0.3);
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.logo-image {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 2px 4px rgba(139, 115, 85, 0.3));
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-text-title);
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(139, 115, 85, 0.2);
}

.auth-subtitle {
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--color-text-body);
    opacity: 0.8;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-divider);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    color: var(--color-text-body);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(215, 193, 169, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-hint {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.link-secondary {
    color: var(--color-accent-hover);
    text-decoration: none;
    font-size: 0.95rem;
    font-family: var(--font-ui);
    transition: color 0.2s;
}

.link-secondary:hover {
    color: var(--color-text-title);
    text-decoration: underline;
}

.link-primary {
    color: var(--color-accent-hover);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-ui);
    transition: color 0.2s;
}

.link-primary:hover {
    color: var(--color-text-title);
}

.error-message {
    background: rgba(229, 115, 115, 0.1);
    color: #C62828;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    border-right: 4px solid #E57373;
}

.success-message {
    background: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    border-right: 4px solid #4CAF50;
}

.btn-primary,
.btn-secondary {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-ui);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
    color: var(--color-text-title);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--color-text-body);
    border: 1px solid var(--color-divider);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--color-accent);
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-text {
    display: inline;
}

.btn-loader {
    display: none;
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    color: #666;
}

.auth-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-verse {
    text-align: center;
    color: var(--color-text-title);
    padding: 2rem;
}

.verse-text {
    font-size: 1.5rem;
    font-weight: 400;
    font-family: var(--font-body);
    margin-bottom: 1rem;
    line-height: 1.9;
    text-shadow: 0 2px 4px rgba(139, 115, 85, 0.2);
}

.verse-author {
    font-size: 1rem;
    font-family: var(--font-ui);
    opacity: 0.7;
    color: var(--color-text-body);
}

/* Profile Page */
.profile-page {
    min-height: 100vh;
    background: var(--color-canvas);
    position: relative;
}

.profile-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.4'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

.site-header {
    background: linear-gradient(180deg, rgba(232, 230, 223, 0.95) 0%, rgba(215, 193, 169, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--color-divider);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-soft);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    width: 40px;
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--color-text-body);
    text-decoration: none;
    font-weight: 500;
    font-family: var(--font-ui);
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent-hover);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-text-body);
    transition: color 0.2s ease;
}

.mobile-menu-toggle:hover {
    color: var(--color-accent-hover);
}

.mobile-menu-toggle svg {
    width: 28px;
    height: 28px;
}

.profile-main {
    padding: 3rem 0;
    position: relative;
    z-index: 2;
}

.profile-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(135deg, rgba(248, 246, 240, 0.95) 0%, rgba(232, 230, 223, 0.9) 100%);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
    border: 2px solid rgba(168, 155, 141, 0.2);
}

.profile-avatar {
    position: relative;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    font-family: var(--font-display);
    box-shadow: var(--shadow-soft);
}

.profile-name {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-text-title);
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(139, 115, 85, 0.2);
}

.profile-bio {
    color: var(--color-text-body);
    font-size: 1rem;
    font-family: var(--font-body);
    opacity: 0.85;
}

.profile-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) transparent;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--color-divider);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: var(--color-text-body);
}

.tab-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent-hover);
    background: rgba(255, 255, 255, 0.9);
}

.tab-btn.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent-hover);
    box-shadow: var(--shadow-soft);
}

.profile-content {
    background: linear-gradient(135deg, rgba(248, 246, 240, 0.95) 0%, rgba(232, 230, 223, 0.9) 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-medium);
    border: 2px solid rgba(168, 155, 141, 0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.library-section,
.journey-section,
.mood-section,
.notes-section {
    margin-bottom: 3rem;
}

.library-section:last-child,
.journey-section:last-child,
.mood-section:last-child,
.notes-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-text-title);
    text-shadow: 0 1px 2px rgba(139, 115, 85, 0.1);
}

.section-description {
    color: var(--color-text-body);
    font-family: var(--font-body);
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.poems-grid,
.collections-grid,
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-body);
    font-family: var(--font-body);
    opacity: 0.7;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-body);
    font-family: var(--font-body);
    font-style: italic;
    opacity: 0.6;
}

.volume-slider {
    width: 100%;
    margin: 0.5rem 0;
}

.audio-settings {
    max-width: 500px;
}

.consultation-intro {
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 2rem;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.topic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--color-divider);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.topic-card:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.topic-icon {
    font-size: 2rem;
}

.topic-name {
    font-weight: 600;
    font-family: var(--font-ui);
    color: var(--color-text-title);
}

.consultation-form-wrapper {
    text-align: center;
    margin: 2rem 0;
}

.site-footer {
    background: linear-gradient(180deg, var(--color-text-title) 0%, var(--color-text-body) 100%);
    color: var(--color-canvas);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
    font-family: var(--font-ui);
    box-shadow: 0 -4px 20px rgba(139, 115, 85, 0.2);
}

.back-link {
    display: inline-block;
    color: var(--color-accent-hover);
    text-decoration: none;
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: var(--font-ui);
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--color-text-title);
    text-decoration: underline;
}

.consultation-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-top: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-divider);
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-display);
    margin-bottom: 1rem;
    color: var(--color-text-title);
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 0.5rem 0;
    padding-right: 1.5rem;
    position: relative;
}

.info-card li:before {
    content: "✓";
    position: absolute;
    right: 0;
    color: var(--color-accent-hover);
    font-weight: bold;
}

.consultation-form-container {
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-divider);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .auth-decoration {
        display: none;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    /* Mobile Header Navigation */
    .site-header {
        padding: 0.75rem 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, rgba(232, 230, 223, 0.98) 0%, rgba(215, 193, 169, 0.95) 100%);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 5rem 2rem 2rem;
        box-shadow: -4px 0 20px rgba(139, 115, 85, 0.3);
        transition: right 0.3s ease;
        z-index: 1000;
        align-items: flex-start;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a,
    .nav-links button {
        width: 100%;
        padding: 1rem 0;
        font-size: 1.125rem;
        border-bottom: 1px solid var(--color-divider);
        text-align: right;
    }
    
    .nav-links a:last-child,
    .nav-links button:last-child {
        border-bottom: none;
    }
    
    /* Mobile Menu Close Button */
    .nav-links::before {
        content: '×';
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
        color: var(--color-text-body);
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.2s ease;
    }
    
    .nav-links::before:hover {
        background: rgba(215, 193, 169, 0.3);
        color: var(--color-accent-hover);
    }
    
    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(44, 36, 22, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }
    
    .logo img {
        width: 36px;
        height: 36px;
    }
    
    .profile-header {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem;
    }
    
    .profile-actions {
        justify-self: center;
    }
    
    .profile-tabs {
        flex-wrap: wrap;
    }
    
    .consultation-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .auth-title {
        font-size: 1.5rem;
    }
    
    .site-header {
        padding: 0.5rem 0;
    }
    
    .logo img {
        width: 32px;
        height: 32px;
    }
    
    .mobile-menu-toggle svg {
        width: 24px;
        height: 24px;
    }
    
    .nav-links {
        width: 100%;
        right: -100%;
    }
    
    .nav-links a,
    .nav-links button {
        font-size: 1rem;
        padding: 0.875rem 0;
    }
    
    .profile-name {
        font-size: 1.5rem;
    }
    
    .profile-header {
        padding: 1rem;
    }
    
    .poems-grid,
    .collections-grid {
        grid-template-columns: 1fr;
    }
}
