/* ============================================================
   MegaFortune - Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

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

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent-gold: #f5a623;
    --accent-gold-dark: #d4911e;
    --bg: #f0f2f8;
    --surface: #ffffff;
    --text: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-gold: linear-gradient(135deg, #f5a623 0%, #f7c948 100%);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--secondary); }
img { max-width: 100%; display: block; }

/* ---- Navigation ---- */

.main-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: relative;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.35rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-icon { font-size: 1.5rem; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: background .2s, color .2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(102,126,234,0.1);
    color: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Layout ---- */

.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

.content-main { min-width: 0; }

.content-sidebar {
    position: sticky;
    top: 96px;
}

/* ---- Hero ---- */

.hero {
    background: var(--gradient);
    border-radius: var(--radius);
    padding: 56px 40px;
    text-align: center;
    color: white;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15) 0%, transparent 60%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
    position: relative;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.92;
    max-width: 600px;
    margin: 0 auto 24px;
    position: relative;
}

.hero .next-drawing {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(6px);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
}

/* ---- Section ---- */

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.section-subtitle {
    color: var(--text-muted);
    margin-top: -16px;
    margin-bottom: 24px;
    font-size: 1rem;
}

/* ---- Zodiac Card Grid ---- */

.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.zodiac-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .25s, box-shadow .25s;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 2px solid transparent;
}

.zodiac-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    color: inherit;
}

.zodiac-card .card-emoji {
    font-size: 2.4rem;
    margin-bottom: 8px;
    display: block;
}

.zodiac-card .card-symbol {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.zodiac-card .card-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.zodiac-card .card-dates {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.zodiac-card .card-stars {
    color: var(--accent-gold);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

/* ---- Number Balls ---- */

.numbers-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.number-ball {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    animation: ballBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.main-ball {
    background: var(--surface);
    color: var(--text);
    border: 3px solid var(--primary);
    box-shadow: 0 4px 16px rgba(102,126,234,0.2);
}

.mega-ball {
    background: var(--gradient-gold);
    color: #fff;
    border: 3px solid var(--accent-gold-dark);
    box-shadow: 0 4px 16px rgba(245,166,35,0.35);
    font-size: 1.4rem;
}

.mega-separator {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0 4px;
}

@keyframes ballBounce {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* ---- Fortune Detail Card ---- */

.fortune-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px;
    margin-bottom: 28px;
}

.fortune-card h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.fortune-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.fortune-zodiac-icon {
    font-size: 3.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: 20px;
    flex-shrink: 0;
}

.fortune-zodiac-info h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fortune-zodiac-info .meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.fortune-section {
    margin-bottom: 24px;
}

.fortune-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fortune-section .stars {
    color: var(--accent-gold);
    font-size: 1rem;
    letter-spacing: 1px;
}

.fortune-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.fortune-extras {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.fortune-extra-item {
    text-align: center;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.fortune-extra-item .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.fortune-extra-item .value {
    font-weight: 700;
    font-size: 1rem;
}

.color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 6px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* ---- Numbers Card ---- */

.numbers-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px;
    text-align: center;
    margin-bottom: 28px;
}

.numbers-card h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.numbers-card .subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.numbers-card .btn-group {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform .2s, box-shadow .2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(102,126,234,0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(102,126,234,0.5);
}

.btn-gold {
    background: var(--gradient-gold);
    color: white;
    box-shadow: 0 4px 16px rgba(245,166,35,0.35);
}

.btn-gold:hover {
    box-shadow: 0 6px 24px rgba(245,166,35,0.5);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: rgba(102,126,234,0.05);
}

/* ---- How It Works ---- */

.how-it-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0 40px;
}

.step-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* ---- Ad Slots ---- */

.ad-container {
    text-align: center;
    margin: 24px 0;
    min-height: 90px;
}

.ad-placeholder {
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 90px;
}

.ad-placeholder span {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.ad-top-banner .ad-placeholder,
.ad-bottom-banner .ad-placeholder {
    min-height: 90px;
}

.ad-mid-content .ad-placeholder {
    min-height: 250px;
}

.ad-sidebar .ad-placeholder {
    min-height: 600px;
}

/* ---- Share Buttons ---- */

.share-buttons {
    margin: 28px 0;
}

.share-buttons h4 {
    margin-bottom: 12px;
    font-size: 1rem;
}

.share-btn-group {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    cursor: pointer;
    transition: transform .2s, opacity .2s;
}

.share-btn:hover { transform: scale(1.1); color: white; }
.share-twitter { background: #1da1f2; }
.share-facebook { background: #1877f2; }
.share-copy { background: var(--text-secondary); }

/* ---- Content Pages ---- */

.content-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.content-page h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-page .page-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

.content-page h2 {
    font-size: 1.4rem;
    margin-top: 36px;
    margin-bottom: 12px;
}

.content-page h3 {
    font-size: 1.15rem;
    margin-top: 24px;
    margin-bottom: 8px;
}

.content-page p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.content-page ul, .content-page ol {
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-left: 24px;
}

.content-page li {
    margin-bottom: 8px;
}

.content-page .info-box {
    background: rgba(102,126,234,0.08);
    border-left: 4px solid var(--primary);
    padding: 20px 24px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 24px 0;
}

.content-page .info-box p {
    color: var(--text);
    margin-bottom: 0;
}

.content-page .warning-box {
    background: rgba(245,166,35,0.1);
    border-left: 4px solid var(--accent-gold);
    padding: 20px 24px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 24px 0;
}

.content-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.content-page th,
.content-page td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.content-page th {
    font-weight: 600;
    background: var(--bg);
}

/* ---- Footer ---- */

.site-footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    margin-top: 60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-grid h4 {
    color: white;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.footer-grid p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid li { margin-bottom: 8px; }

.footer-grid a {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    transition: color .2s;
}

.footer-grid a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.82rem;
}

/* ---- Cookie Consent Banner ---- */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    transform: translateY(100%);
    transition: transform .4s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-text { flex: 1; min-width: 280px; }
.cookie-text p { color: var(--text-secondary); font-size: 0.9rem; margin: 0; line-height: 1.6; }
.cookie-text a { color: var(--primary); text-decoration: underline; }

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-accept, .cookie-essential {
    padding: 10px 20px;
    font-size: 0.88rem;
    white-space: nowrap;
}

/* ---- Breadcrumbs ---- */

.breadcrumbs {
    margin-bottom: 24px;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    margin: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.breadcrumbs li + li::before {
    content: '/';
    margin: 0 8px;
    color: var(--border);
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    .content-sidebar {
        display: none;
    }
    .zodiac-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 12px 24px 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 16px; }

    .hero { padding: 40px 24px; }
    .hero h1 { font-size: 2rem; }

    .zodiac-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .zodiac-card { padding: 20px 14px; }

    .how-it-works { grid-template-columns: 1fr; }

    .fortune-card { padding: 24px 20px; }
    .fortune-header { flex-direction: column; text-align: center; }
    .fortune-extras { grid-template-columns: 1fr; }

    .number-ball { width: 54px; height: 54px; font-size: 1.15rem; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .content-page { padding: 24px 16px 40px; }
    .content-page h1 { font-size: 1.7rem; }
}

@media (max-width: 480px) {
    .zodiac-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .zodiac-card .card-emoji { font-size: 2rem; }
    .hero h1 { font-size: 1.6rem; }
    .number-ball { width: 48px; height: 48px; font-size: 1rem; }
}
