/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #8B5CF6;
    --deep-purple: #6D28D9;
    --mystical-blue: #3B82F6;
    --mystical-pink: #EC4899;
    --dark-bg: #0F0A1F;
    --darker-bg: #0A0515;
    --card-bg: rgba(139, 92, 246, 0.1);
    --card-border: rgba(139, 92, 246, 0.3);
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --mystical-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Star Background */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, #0A0515 0%, #1a0b2e 50%, #16213e 100%);
}

.stars, .stars2, .stars3 {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
}

.stars {
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 60px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 50px, #ddd, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 10px, #eee, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 3s ease-in-out infinite;
}

.stars2 {
    background-image:
        radial-gradient(1px 1px at 100px 150px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 150px 80px, #ddd, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 80px 120px, #eee, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 250px 250px;
    animation: twinkle 4s ease-in-out infinite reverse;
}

.stars3 {
    background-image:
        radial-gradient(1px 1px at 170px 100px, #8B5CF6, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 200px 50px, #EC4899, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 180px, #3B82F6, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 300px 300px;
    animation: twinkle 5s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 5, 21, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.moon-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

.logo-text {
    background: var(--mystical-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--mystical-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link-button {
    padding: 0.6rem 1.5rem;
    background: var(--mystical-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 4rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
}

.mystical-symbol {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--mystical-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.cta-button {
    background: var(--mystical-gradient);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

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

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.float-element {
    position: absolute;
    font-size: 3rem;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.moon { top: 20%; left: 10%; animation-delay: 0s; }
.star1 { top: 30%; right: 15%; animation-delay: 1s; }
.star2 { bottom: 30%; left: 20%; animation-delay: 2s; }
.crystal { bottom: 20%; right: 10%; animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* CTA Section */
.cta-section {
    min-height: 60vh;
    padding: 6rem 5% 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-content {
    text-align: center;
    max-width: 800px;
}

.cta-button-large {
    background: var(--mystical-gradient);
    color: white;
    border: none;
    padding: 1.4rem 3.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    margin-top: 2rem;
}

.cta-button-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6);
}

.cta-small-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Interpretation Section (moved to dashboard) */
.interpretation-section {
    min-height: 100vh;
    padding: 6rem 5% 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--mystical-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.interpretation-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Dream Input Card */
.dream-input-card {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.card-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
}

.input-mode-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    padding: 0.3rem;
    border-radius: 50px;
}

.mode-btn {
    padding: 0.6rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mode-btn.active {
    background: var(--mystical-gradient);
    color: white;
}

.input-container {
    position: relative;
}

.dream-textarea {
    width: 100%;
    background: rgba(15, 10, 31, 0.5);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
}

.dream-textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.dream-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Voice Input */
.voice-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: rgba(15, 10, 31, 0.5);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    padding: 2rem;
}

.voice-input.hidden {
    display: none;
}

.voice-animation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.voice-wave {
    width: 4px;
    height: 30px;
    background: var(--mystical-gradient);
    border-radius: 10px;
    animation: wave 1s ease-in-out infinite;
}

.voice-wave:nth-child(1) { animation-delay: 0s; }
.voice-wave:nth-child(2) { animation-delay: 0.1s; }
.voice-wave:nth-child(3) { animation-delay: 0.2s; }
.voice-wave:nth-child(4) { animation-delay: 0.3s; }
.voice-wave:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { height: 30px; }
    50% { height: 60px; }
}

.voice-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.voice-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    background: var(--mystical-gradient);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.voice-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6);
}

.voice-btn.recording {
    animation: recordingPulse 1.5s ease-in-out infinite;
}

@keyframes recordingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.voice-icon {
    font-size: 3rem;
}

/* Additional Info */
.additional-info {
    margin-top: 1.5rem;
}

.additional-info label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.mood-input {
    width: 100%;
    background: rgba(15, 10, 31, 0.5);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.mood-input:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.mood-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Interpret Button */
.interpret-button {
    width: 100%;
    margin-top: 2rem;
    padding: 1.3rem;
    background: var(--mystical-gradient);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.interpret-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6);
}

.interpret-button:active {
    transform: translateY(0);
}

/* Results Card */
.results-card {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease;
}

.results-card.hidden {
    display: none;
}

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.results-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    background: var(--mystical-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: rgba(139, 92, 246, 0.2);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(139, 92, 246, 0.4);
    transform: rotate(90deg);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.loading-state.hidden {
    display: none;
}

.mystical-loader {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.loader-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--mystical-gradient);
    animation: loaderBounce 1.4s ease-in-out infinite;
}

.loader-circle:nth-child(1) { animation-delay: 0s; }
.loader-circle:nth-child(2) { animation-delay: 0.2s; }
.loader-circle:nth-child(3) { animation-delay: 0.4s; }

@keyframes loaderBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.loading-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Results Content */
.results-content {
    animation: fadeIn 0.5s ease;
}

.results-content.hidden {
    display: none;
}

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

.result-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: rgba(15, 10, 31, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.result-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.result-section h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-purple);
}

.result-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Worry Indicator */
.worry-indicator {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.worry-level-item {
    flex: 1;
    height: 10px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.worry-level-item.active {
    background: var(--mystical-gradient);
    animation: fillBar 0.5s ease;
}

@keyframes fillBar {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.new-interpretation-btn {
    width: 100%;
    padding: 1.2rem;
    background: rgba(139, 92, 246, 0.2);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-interpretation-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--primary-purple);
    transform: translateY(-2px);
}

/* Features Section */
.features-section {
    padding: 6rem 5%;
    background: rgba(139, 92, 246, 0.02);
}

.features-grid {
    max-width: 1200px;
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
    border-color: var(--primary-purple);
}

.feature-icon-large {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Pricing Section */
.pricing-section {
    padding: 6rem 5%;
}

.pricing-grid {
    max-width: 1200px;
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.pricing-card {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
}

.pricing-card.featured {
    border: 2px solid var(--primary-purple);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.4);
}

.featured-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mystical-gradient);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.plan-name {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.plan-price {
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.3rem;
}

.currency {
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.amount {
    font-size: 4rem;
    font-weight: 700;
    background: var(--mystical-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.period {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 2rem;
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.plan-features li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-button {
    width: 100%;
    padding: 1.2rem;
    background: var(--mystical-gradient);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.5);
}

.pricing-card:not(.featured) .plan-button {
    background: rgba(139, 92, 246, 0.2);
    border: 2px solid rgba(139, 92, 246, 0.4);
}

.pricing-card:not(.featured) .plan-button:hover {
    background: rgba(139, 92, 246, 0.3);
}

/* Footer */
.footer {
    background: rgba(10, 5, 21, 0.9);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    padding: 3rem 5% 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-family: 'Cinzel', serif;
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-purple);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .section-title {
        font-size: 2rem;
    }

    .card-header {
        flex-direction: column;
        gap: 1rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .dream-input-card,
    .results-card {
        padding: 1.5rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
