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

:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --bg-dark: #0f0a1a;
    --bg-darker: #0a0612;
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
    --border: rgba(124, 58, 237, 0.2);
    --card-bg: rgba(20, 15, 35, 0.8);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-darker);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
.dream-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(ellipse at top, rgba(124, 58, 237, 0.15), transparent),
                radial-gradient(ellipse at bottom, rgba(236, 72, 153, 0.1), transparent);
    animation: dreamFloat 20s ease-in-out infinite;
}

@keyframes dreamFloat {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.5; transform: translateY(-20px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(15, 10, 26, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.1) 0%, transparent 100%);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* Dream Input Section */
.dream-input-section {
    max-width: 700px;
    margin: 0 auto 3rem;
}

.dream-input-section label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.dream-input-section textarea {
    width: 100%;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
}

.dream-input-section textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.char-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.tip {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-premium,
.btn-share,
.btn-journal {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
}

.btn-interpret {
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
    margin-top: 1rem;
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-premium {
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

.btn-share,
.btn-journal {
    background: rgba(124, 58, 237, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
    margin-top: 1rem;
}

.btn-share:hover,
.btn-journal:hover {
    background: rgba(124, 58, 237, 0.3);
}

/* Quick Lookup */
.quick-lookup {
    max-width: 700px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.quick-lookup h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.symbol-search {
    display: flex;
    gap: 1rem;
}

.symbol-search input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
}

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

/* Results Section */
.results-section {
    padding: 4rem 0;
    background: rgba(124, 58, 237, 0.05);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.symbols-found {
    margin-bottom: 3rem;
}

.symbols-found h4 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.symbol-card-mini {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.symbol-card-mini:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.symbol-card-mini h5 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.symbol-card-mini .category {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Free Interpretation */
.free-interpretation {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.interpretation-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

.interpretation-card h4 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.interpretation-text {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.disclaimer {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Premium Upsell */
.premium-upsell {
    max-width: 800px;
    margin: 0 auto 3rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
}

.premium-upsell h4 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.premium-upsell > p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.premium-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
    display: inline-block;
}

.premium-features li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* Dream Actions */
.dream-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

/* Symbol Modal */
.symbol-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-content {
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--primary);
}

.category-badge {
    display: inline-block;
    background: rgba(124, 58, 237, 0.3);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.symbol-meanings {
    margin-top: 2rem;
}

.meaning-section {
    margin-bottom: 2rem;
}

.meaning-section h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.meaning-section p {
    line-height: 1.8;
}

/* Symbol Database */
.symbols-section {
    padding: 4rem 0;
}

.symbols-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.symbol-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.symbol-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.symbol-card h4 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.symbol-preview {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Journal Section */
.journal-section {
    padding: 4rem 0;
}

.section-light {
    background: rgba(255, 255, 255, 0.02);
}

.journal-entries {
    max-width: 800px;
    margin: 0 auto;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
    font-style: italic;
}

.journal-entry {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

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

.entry-header h4 {
    color: var(--primary);
}

.delete-entry {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.delete-entry:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.entry-dream {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.entry-symbols {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.symbol-tag {
    background: rgba(124, 58, 237, 0.3);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.step h3 {
    margin-bottom: 1rem;
}

.step p {
    color: var(--text-muted);
}

/* Pricing */
.pricing-section {
    padding: 4rem 0;
    background: rgba(124, 58, 237, 0.05);
}

.pricing-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

.pricing-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.3);
    transform: scale(1.05);
}

.pricing-card .badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-card ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.pricing-card ul li:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .symbol-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .symbols-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .dream-actions {
        flex-direction: column;
    }
    
    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
}
