/* ========== GLOBAL VARIABLES & RESET (Shared with navigation) ========== */
:root {
    --bg: #0b0a12;
    --card-bg: rgba(18, 15, 28, 0.8);
    --text: #d6d2e0;
    --text-light: #a098b8;
    --border: rgba(150, 140, 200, 0.25);
    --accent: #a090c8;
    --accent-hover: #c8b8f0;
    --nav-bg: rgba(10, 8, 18, 0.94);
    --shadow: 0 8px 24px rgba(0,0,0,0.5);
    --radius: 16px;
    --transition: 0.3s ease;
    --nav-text: #d6d2e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    font-family: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
    padding: 0;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-image: 
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,240,0.6), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,240,0.5), transparent),
        radial-gradient(1px 1px at 80% 70%, rgba(255,255,240,0.4), transparent),
        radial-gradient(1px 1px at 40% 80%, rgba(255,255,240,0.6), transparent),
        radial-gradient(1px 1px at 15% 60%, rgba(255,255,240,0.5), transparent),
        radial-gradient(1px 1px at 70% 20%, rgba(255,255,240,0.4), transparent),
        radial-gradient(2px 2px at 35% 45%, rgba(200,180,255,0.4), transparent),
        radial-gradient(2px 2px at 65% 55%, rgba(200,180,255,0.3), transparent),
        linear-gradient(180deg, #0f0c1a 0%, #141125 30%, #0e0b18 60%, #120f20 100%);
    background-attachment: fixed;
}

/* ========== NAVIGATION ========== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(150, 140, 200, 0.25);
    padding: 0 1.5rem;
    width: 100%;
    transition: box-shadow 0.3s;
}
.site-nav.scrolled {
    box-shadow: 0 2px 16px rgba(150, 130, 200, 0.2);
}
.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    gap: 1rem;
}
.nav-logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.3px;
    color: #e8e0f5;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.75; }
.nav-logo .logo-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c8b8f0;
    box-shadow: 0 0 8px #c8b8f0;
    flex-shrink: 0;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-links a {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    letter-spacing: 0.1px;
}
.nav-links a:hover,
.nav-links a.active {
    background: rgba(200, 180, 240, 0.15);
    color: #c8b8f0;
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.88rem;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    letter-spacing: 0.1px;
    user-select: none;
    color: var(--nav-text);
    background: none;
    border: none;
    font-family: inherit;
}
.nav-dropdown-toggle:hover {
    background: rgba(200, 180, 240, 0.15);
    color: #c8b8f0;
}
.nav-dropdown-toggle .arrow {
    font-size: 0.6rem;
    transition: transform 0.25s;
}
.nav-dropdown.open .nav-dropdown-toggle .arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #1a1530;
    border: 1px solid rgba(150, 140, 200, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
    padding: 0.5rem 0;
    min-width: 220px;
    max-height: 420px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
    z-index: 1001;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 0;
    white-space: nowrap;
    color: #b0a8c8;
    text-decoration: none;
    transition: background 0.15s;
}
.nav-dropdown-menu a:hover {
    background: rgba(200, 180, 240, 0.15);
    color: #c8b8f0;
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    flex-direction: column;
    gap: 5px;
    z-index: 1002;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #e8e0f5;
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999;
    padding: 1rem;
    overflow-y: auto;
    flex-direction: column;
    gap: 0.25rem;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
    display: block;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #b0a8c8;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s;
}
.mobile-menu a:hover,
.mobile-menu a.active {
    background: rgba(200, 180, 240, 0.15);
    color: #c8b8f0;
}
.mobile-menu .mobile-divider { height: 1px; background: rgba(150, 140, 200, 0.2); margin: 0.4rem 0; }
.mobile-menu .mobile-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8a83a5;
    padding: 0.5rem 1rem 0.2rem;
}

/* ========== PAGE SPECIFIC STYLES (Zodiac) ========== */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(1px 1px at 10% 15%, #fff, transparent 2px),
        radial-gradient(1px 1px at 25% 35%, #fff, transparent 2px),
        radial-gradient(1px 1px at 45% 55%, #fff, transparent 2px),
        radial-gradient(1px 1px at 65% 25%, #fff, transparent 2px),
        radial-gradient(1px 1px at 85% 45%, #fff, transparent 2px),
        radial-gradient(1px 1px at 15% 75%, #fff, transparent 2px),
        radial-gradient(1px 1px at 55% 80%, #fff, transparent 2px),
        radial-gradient(1px 1px at 75% 65%, #fff, transparent 2px),
        radial-gradient(1.5px 1.5px at 30% 50%, #c8b8f0, transparent 3px),
        radial-gradient(1.5px 1.5px at 60% 40%, #d0c0f5, transparent 3px);
    opacity: 0.7;
}

.container {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.8rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2.6rem;
}

.constellation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #c8b8f0;
    border: 1px solid #5a5080;
    padding: 0.35rem 1.8rem;
    border-radius: 30px;
    background: rgba(20, 18, 30, 0.7);
    backdrop-filter: blur(6px);
    margin-bottom: 1rem;
}
.constellation-badge::before,
.constellation-badge::after {
    content: '✦';
    font-size: 1rem;
    color: #f0e680;
}

h1 {
    font-size: 2.8rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: #e8e0f5;
    margin-bottom: 0.3rem;
    text-shadow: 0 0 12px rgba(180, 160, 240, 0.5);
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
    border-bottom: 1px solid rgba(200, 180, 240, 0.3);
    display: inline-block;
    padding-bottom: 0.5rem;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    letter-spacing: 0.6px;
    font-family: 'Segoe UI', sans-serif;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 2rem;
    margin-top: 0.5rem;
}

.palette-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    box-shadow: 0 0 0 1px rgba(150, 140, 200, 0.25), var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.palette-card::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(200,180,240,0.3), transparent 40%, rgba(240,220,120,0.2));
    z-index: -1;
    opacity: 0.5;
}
.palette-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 0 1px rgba(200, 180, 240, 0.6), 0 12px 32px rgba(100, 80, 160, 0.4);
}

.color-strip {
    display: flex;
    width: 100%;
    height: 108px;
    cursor: pointer;
}
.color-swatch {
    flex: 1;
    position: relative;
    transition: filter 0.2s, transform 0.2s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
}
.color-swatch:hover {
    filter: brightness(1.1);
    transform: scaleY(1.05);
    z-index: 3;
    box-shadow: 0 6px 16px rgba(180, 160, 240, 0.4);
}
.swatch-hex {
    font-size: 0.6rem;
    font-weight: 550;
    color: rgba(255,255,245,0.95);
    background: rgba(15, 12, 25, 0.55);
    padding: 2px 8px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    white-space: nowrap;
}
.color-swatch:hover .swatch-hex { opacity: 1; }
.swatch-hex.light-text {
    color: rgba(20, 18, 30, 0.92);
    background: rgba(240, 235, 255, 0.8);
}

.palette-info {
    padding: 1rem 1.2rem 0.9rem 1.2rem;
    background: transparent;
}
.palette-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}
.palette-name {
    font-weight: 650;
    font-size: 1.15rem;
    letter-spacing: 0.8px;
    color: #e8e0f5;
    border-bottom: 1px dotted #a090c8;
    padding-bottom: 3px;
}
.copy-group-btn {
    background: rgba(200, 180, 240, 0.1);
    border: 1px solid #7a6fa0;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 550;
    color: #d0c8f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.25s;
    letter-spacing: 0.4px;
    font-family: 'Segoe UI', sans-serif;
}
.copy-group-btn:hover {
    background: #6a5d90;
    border-color: #c8b8f0;
    color: #fff;
    box-shadow: 0 0 12px rgba(150, 130, 200, 0.5);
}

.color-names {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    align-items: center;
    margin-top: 0.2rem;
}
.color-tag {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    color: #c4bcd0;
    padding: 0.25rem 0.75rem;
    border-radius: 14px;
    font-weight: 400;
    letter-spacing: 0.2px;
    white-space: nowrap;
    border: 0.5px solid rgba(180, 160, 220, 0.3);
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
    cursor: pointer;
    font-family: 'Segoe UI', sans-serif;
}
.color-tag:hover {
    background: rgba(180, 160, 220, 0.2);
    border-color: #a090c8;
    color: #f0eaff;
    transform: translateY(-1px);
}
.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 6px;
    opacity: 0.9;
    box-shadow: 0 0 4px currentColor;
}

.footer-note {
    margin-top: 3.4rem;
    text-align: center;
    color: #8a83a5;
    font-size: 0.82rem;
    font-weight: 360;
    border-top: 1px solid rgba(200, 180, 240, 0.2);
    padding-top: 1.7rem;
    width: 100%;
    max-width: 620px;
    letter-spacing: 0.6px;
}

.toast-message {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: #2e2850;
    color: #e8e0f5;
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 480;
    box-shadow: 0 0 20px rgba(150, 130, 200, 0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.5px;
    border: 1px solid #a090c8;
}
.toast-message.show { opacity: 1; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .container { padding: 1.4rem 1rem; }
    h1 { font-size: 2rem; }
    .palette-grid { grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 1.4rem; }
}
@media (min-width: 769px) {
    .mobile-menu { display: none !important; }
}