:root {
    --gold: #d4af37;
    --gold-light: #f4e4ba;
    --deep-purple: #1a0a2e;
    --mystic-purple: #2d1b4e;
    --soft-purple: #4a3066;
    --cream: #f5f0e8;
    --text-light: #e8e0d5;
}

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

body {
    font-family: 'Amarante', Georgia, serif;
    background: var(--deep-purple);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

#logo {
    height: 300px;
    width: auto;
}

/* Animated starfield background */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Mystic gradient overlay */
.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(74, 48, 102, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(45, 27, 78, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-family: 'Amarante', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
    letter-spacing: 0.15em;
    margin-bottom: 10px;
}

.tagline {
    font-style: italic;
    font-size: 1.3rem;
    color: var(--gold-light);
    opacity: 0.8;
}

/* Navigation */
.main-nav {
    margin-top: 25px;
}

.nav-list {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-block;
    padding: 10px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--gold);
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.1);
}

.nav-link.active {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.15);
}

/* Decorative elements */
.ornament {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.ornament-line {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ornament-symbol {
    font-size: 1.5rem;
    color: var(--gold);
}

/* Upload zone */
.upload-section {
    animation: fadeIn 1s ease-out 0.3s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.upload-zone {
    border: 2px dashed var(--gold);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    background: rgba(212, 175, 55, 0.03);
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
    border-radius: 50%;
}

.upload-zone:hover::before {
    width: 400px;
    height: 400px;
}

.upload-zone:hover {
    border-color: var(--gold-light);
    background: rgba(212, 175, 55, 0.08);
}

.upload-zone.dragover {
    border-color: var(--gold-light);
    background: rgba(212, 175, 55, 0.15);
    transform: scale(1.02);
}

.hand-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.upload-text {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.upload-subtext {
    font-size: 1rem;
    opacity: 0.6;
}

#file-input {
    display: none;
}

/* Preview */
.preview-section {
    display: none;
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
}

.preview-section.visible {
    display: block;
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.preview-image {
    max-width: 350px;
    max-height: 400px;
    border-radius: 15px;
    border: 3px solid var(--gold);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 60px rgba(212, 175, 55, 0.1);
}

/* Buttons */
.btn {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    padding: 16px 45px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, #b8960c 100%);
    color: var(--deep-purple);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    margin-left: 15px;
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
}

.buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 60px;
}

.loading.visible {
    display: block;
}

.crystal-ball {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 60%),
                radial-gradient(circle, var(--soft-purple), var(--mystic-purple));
    margin: 0 auto 30px;
    animation: float 2s ease-in-out infinite, glow 1.5s ease-in-out infinite alternate;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes glow {
    from { box-shadow: 0 0 40px rgba(212, 175, 55, 0.3); }
    to { box-shadow: 0 0 60px rgba(212, 175, 55, 0.6); }
}

.loading-text {
    font-size: 1.3rem;
    font-style: italic;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Results */
.results-section {
    display: none;
    margin-top: 50px;
    animation: fadeIn 0.8s ease-out;
}

.results-section.visible {
    display: block;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.results-card {
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.8) 0%, rgba(26, 10, 46, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.reading-content {
    font-size: 1.2rem;
    line-height: 1.9;
    white-space: pre-wrap;
}

.reading-content strong {
    color: var(--gold);
}

/* Sections within reading */
.reading-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.reading-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Disclaimer */
.disclaimer {
    margin-top: 40px;
    padding: 20px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
    opacity: 0.7;
    font-style: italic;
}

/* Affiliate Block */
.affiliate-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    padding: 35px 30px;
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.9) 0%, rgba(74, 48, 102, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 175, 55, 0.1);
}

.affiliate-title {
    font-family: 'Amarante', serif;
    font-size: 1.6rem;
    color: var(--gold);
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.affiliate-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 25px;
    opacity: 0.9;
}

.btn-affiliate {
    display: inline-block;
    text-decoration: none;
    font-size: 1rem;
    padding: 14px 40px;
}

.btn-affiliate:hover {
    text-decoration: none;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 80px;
    padding: 30px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 0.9rem;
    opacity: 0.6;
}

.footer-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--gold-light);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Legal Page */
.legal-content {
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.8) 0%, rgba(26, 10, 46, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.legal-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.legal-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h2 {
    font-family: 'Amarante', serif;
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 15px;
}

.legal-section p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 10px;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

/* Horoscope Page */
.horoscope-intro {
    text-align: center;
    margin-bottom: 40px;
}

.section-heading {
    font-family: 'Amarante', serif;
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-light);
    opacity: 0.8;
}

/* Zodiac Grid */
.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.zodiac-sign {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    background: rgba(45, 27, 78, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Amarante', serif;
    color: var(--text-light);
}

.zodiac-sign:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 175, 55, 0.2);
}

.zodiac-sign.selected {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
}

.zodiac-symbol {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: var(--gold);
}

.zodiac-name {
    font-size: 1rem;
    margin-bottom: 4px;
}

.zodiac-dates {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Horoscope Display */
.horoscope-display {
    display: none;
    text-align: center;
}

.horoscope-display.visible {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.selected-sign-header {
    margin-bottom: 30px;
}

.selected-symbol {
    font-size: 4rem;
    color: var(--gold);
    display: block;
    margin-bottom: 10px;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
}

.selected-name {
    font-family: 'Amarante', serif;
    font-size: 2rem;
    color: var(--gold-light);
}

/* Period Tabs */
.period-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.period-tab {
    padding: 12px 25px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 25px;
    color: var(--text-light);
    font-family: 'Amarante', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-tab:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
}

.period-tab.active {
    background: linear-gradient(135deg, var(--gold) 0%, #b8960c 100%);
    color: var(--deep-purple);
    border-color: var(--gold);
}

/* Horoscope Card */
.horoscope-card {
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.8) 0%, rgba(26, 10, 46, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    display: none;
}

.horoscope-card.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.horoscope-text {
    font-size: 1.2rem;
    line-height: 1.9;
    text-align: left;
}

.horoscope-loading {
    display: none;
    padding: 60px;
}

#change-sign-btn {
    margin-top: 20px;
}

/* Error message */
.error-message {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #ff6b7a;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    display: none;
}

.error-message.visible {
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .logo {
        font-size: 2.5rem;
    }

    .nav-list {
        gap: 5px;
    }

    .nav-link {
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    .upload-zone {
        padding: 40px 20px;
    }
    
    .results-card {
        padding: 25px;
    }
    
    .btn {
        padding: 14px 30px;
        font-size: 1rem;
    }

    /* Horoscope responsive */
    .zodiac-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .zodiac-sign {
        padding: 15px 8px;
    }

    .zodiac-symbol {
        font-size: 2rem;
    }

    .zodiac-name {
        font-size: 0.9rem;
    }

    .zodiac-dates {
        font-size: 0.65rem;
    }

    .period-tabs {
        flex-wrap: wrap;
    }

    .period-tab {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .horoscope-card {
        padding: 25px;
    }

    .horoscope-text {
        font-size: 1.05rem;
    }
}

@media (max-width: 400px) {
    .zodiac-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .period-tabs {
        gap: 8px;
    }

    .period-tab {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}
