/* ===== CSS Variables ===== */
:root {
    --primary: #2C3E50;
    --secondary: #D4AF37;
    --accent-terracotta: #CD853F;
    --accent-teal: #20B2AA;
    --background: #FDF5E6;
    --background-alt: #F5ECD7;
    --text: #3E2723;
    --text-light: #5D4037;

    /* Element colors */
    --fire: #FF4500;
    --water: #1E90FF;
    --earth: #8B4513;
    --air: #87CEEB;
    --green: #228B22;

    /* Realm colors */
    --hanan: #FFD700;
    --kay: #8B4513;
    --ukhu: #2E8B57;

    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-lg: 16px;

    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, #1a252f 100%);
    color: white;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    color: var(--secondary);
    font-size: 2rem;
}

.language-toggle {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.lang-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--primary);
    font-weight: 600;
}

/* ===== Navigation ===== */
.nav {
    background: var(--background-alt);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
}

.nav-btn.active {
    background: var(--primary);
    color: white;
}

/* ===== Main Content ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Home Page ===== */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.05) 0%, rgba(212, 175, 55, 0.1) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-style: italic;
    color: var(--text-light);
    font-size: 1.1rem;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.1rem;
}

.intro-text p {
    margin-bottom: 1rem;
}

/* Realms Overview */
.realms-overview {
    margin-bottom: 3rem;
}

.realms-overview h3 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.realms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.realm-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-left: 4px solid;
    transition: var(--transition);
}

.realm-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.realm-card.hanan { border-color: var(--hanan); }
.realm-card.kay { border-color: var(--kay); }
.realm-card.ukhu { border-color: var(--ukhu); }

.realm-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.realm-translation {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.realm-signs {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    color: var(--text-light);
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin-bottom: 3rem;
}

.cta-btn {
    background: linear-gradient(135deg, var(--secondary) 0%, #c9a227 100%);
    color: var(--primary);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    margin: 0.5rem;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-btn.secondary {
    background: white;
    border: 2px solid var(--secondary);
    color: var(--text);
}

.cta-btn.secondary:hover {
    background: var(--secondary);
    color: var(--primary);
}

/* Signs Preview Grid */
.signs-preview h3 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.signs-grid-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.sign-preview-card {
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.sign-preview-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.sign-preview-symbol {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.sign-preview-name {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== Find Your Sign Page ===== */
.page-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.month-selector {
    margin-bottom: 2rem;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.month-card {
    background: white;
    padding: 1.25rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.month-card:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.month-card.selected {
    border-color: var(--secondary);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.2) 100%);
}

.month-ordinal {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    color: var(--text-light);
}

.month-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Sign Result */
.sign-result {
    animation: revealSign 0.6s ease;
}

@keyframes revealSign {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.result-symbol {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-name {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.result-month {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.result-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.badge {
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.realm-badge {
    background: rgba(44, 62, 80, 0.1);
    color: var(--primary);
}

.element-badge {
    color: white;
}

.element-badge.fire { background: var(--fire); }
.element-badge.water { background: var(--water); }
.element-badge.earth { background: var(--earth); }
.element-badge.air { background: var(--air); }
.element-badge.green { background: var(--green); }

.result-personality {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.result-saying {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-light);
    padding: 1rem;
    background: var(--background-alt);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--secondary);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: #1a252f;
}

.action-btn.secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.action-btn.secondary:hover {
    background: var(--primary);
    color: white;
}

/* ===== Encyclopedia Page ===== */
.filter-bar {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-light);
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.signs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.sign-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.sign-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.sign-card-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sign-card-symbol {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.sign-card-name {
    font-size: 1.25rem;
    color: var(--primary);
}

.sign-card-body {
    padding: 1rem 1.5rem 1.5rem;
}

.sign-card-month {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.sign-card-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trait-tag {
    background: var(--background-alt);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===== Sign Profile Page ===== */
.back-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.back-btn:hover {
    color: var(--primary);
}

.profile-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.profile-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1a252f 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.profile-symbol {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.profile-name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.profile-names-all {
    font-style: italic;
    opacity: 0.8;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.profile-month {
    font-size: 1.1rem;
    opacity: 0.9;
}

.profile-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.profile-badge {
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

.profile-badge.realm {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.profile-badge.element {
    color: white;
}

.profile-body {
    padding: 2rem;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section h4 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
}

.profile-section p {
    line-height: 1.8;
}

.profile-saying {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.25rem;
    text-align: center;
    padding: 2rem;
    background: var(--background-alt);
    border-radius: var(--radius);
    color: var(--text-light);
    border-left: 4px solid var(--secondary);
}

.profile-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.profile-list-item {
    background: var(--background-alt);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.profile-list-item.strength {
    background: rgba(46, 139, 87, 0.1);
    color: var(--green);
}

.profile-list-item.challenge {
    background: rgba(255, 69, 0, 0.1);
    color: var(--fire);
}

.profile-list-item.career {
    background: rgba(30, 144, 255, 0.1);
    color: var(--water);
}

/* ===== Horoscope Page ===== */
.horoscope-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 500;
    color: var(--text-light);
}

.control-group select {
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: white;
    min-width: 200px;
}

.type-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--background-alt);
    padding: 0.25rem;
    border-radius: var(--radius);
}

.type-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: calc(var(--radius) - 2px);
    transition: var(--transition);
}

.type-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.type-btn.active {
    background: white;
    box-shadow: var(--shadow);
    font-weight: 500;
}

.horoscope-placeholder {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.stars-animation {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.horoscope-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

.horoscope-header {
    background: linear-gradient(135deg, var(--primary) 0%, #1a252f 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.horoscope-symbol {
    font-size: 3rem;
}

.horoscope-title h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.horoscope-title p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.horoscope-content {
    padding: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.horoscope-actions {
    padding: 0 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ===== Compatibility Page ===== */
.compatibility-selectors {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.selector-card {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    min-width: 200px;
}

.selector-card label {
    display: block;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.selector-card select {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: white;
    width: 100%;
    margin-bottom: 1rem;
}

.selector-symbol {
    font-size: 3rem;
    margin-top: 0.5rem;
}

.compatibility-heart {
    font-size: 2rem;
    color: var(--fire);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.compatibility-result {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 700px;
    margin: 2rem auto 0;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

.compat-header {
    background: linear-gradient(135deg, var(--primary) 0%, #1a252f 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
}

.compat-connector {
    margin: 0 1rem;
    color: var(--secondary);
}

.compat-badge {
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.compat-badge.golden {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.3) 100%);
    color: #b8860b;
}

.compat-badge.challenging {
    background: rgba(255, 69, 0, 0.1);
    color: var(--fire);
}

.compat-badge.teaching {
    background: rgba(30, 144, 255, 0.1);
    color: var(--water);
}

.compat-badge.harmonious {
    background: rgba(46, 139, 87, 0.1);
    color: var(--green);
}

.compat-badge.neutral {
    background: var(--background-alt);
    color: var(--text-light);
}

.compat-sections {
    padding: 1.5rem 2rem 2rem;
}

.compat-section {
    margin-bottom: 1.5rem;
}

.compat-section:last-child {
    margin-bottom: 0;
}

.compat-section h4 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.compat-section p {
    line-height: 1.7;
    color: var(--text-light);
}

/* ===== Footer ===== */
.footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius);
    transition: var(--transition);
}

.footer-links a:hover {
    background: var(--secondary);
    color: var(--primary);
    border-color: var(--secondary);
}

.disclaimer {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.credits {
    font-style: italic;
    color: var(--secondary);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .language-toggle {
        justify-content: center;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .main-content {
        padding: 1rem;
    }

    .months-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .signs-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .compatibility-selectors {
        flex-direction: column;
    }

    .compatibility-heart {
        transform: rotate(90deg);
    }

    .horoscope-controls {
        flex-direction: column;
        align-items: center;
    }

    .profile-hero {
        padding: 2rem 1rem;
    }

    .profile-symbol {
        font-size: 4rem;
    }

    .profile-name {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 0.5rem;
    }

    .nav-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }

    .result-card {
        padding: 1.5rem;
    }

    .cta-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* ===== Page Title Styles ===== */
.page > h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
