/* Dark Theme CSS - Updated Sept 14 2025 - Force Cache Update */

:root {
    --primary-color: #8b5cf6;
    --secondary-color: #a855f7;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --accent-color: #06b6d4;

    /* Dark Theme Colors */
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --text-muted: #a0a0a0;
    --border-color: #404040;

    /* Gradients for Dark Theme */
    --gradient-1: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    --gradient-3: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-bg: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);

    /* Shadows for Dark Theme */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    background-image:
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 24px);
    width: 100%;
}

/* Header */
.header {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-normal);
    width: 100%;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.5rem, 2vw, 0.8rem) 0;
    min-height: clamp(50px, 8vw, 70px);
    gap: 1rem;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    background: var(--gradient-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.1rem;
    display: inline-block;
    line-height: 1.1;
    font-weight: 700;
    white-space: nowrap;
}

.tagline {
    font-size: clamp(0.6rem, 1.5vw, 0.7rem);
    color: #6b7280;
    line-height: 1.2;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: clamp(0.8rem, 2vw, 1.5rem);
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-normal);
    position: relative;
    padding: 0.3rem 0;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    white-space: nowrap;
}

.nav a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

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

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

.nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: clamp(2rem, 6vw, 4rem) 0 clamp(1.5rem, 4vw, 3rem);
    background: transparent;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.hero-content {
    text-align: center;
    color: var(--text-primary);
}

.hero-title {
    font-size: clamp(1.5rem, 5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: clamp(0.8rem, 2vw, 1.2rem);
    line-height: 1.2;
    text-align: center;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-secondary);
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    text-align: center;
    padding: 0 1rem;
}

/* Search Container */
.search-container {
    max-width: min(700px, 90vw);
    margin: 0 auto;
    width: 100%;
}

.search-box {
    display: flex;
    background: var(--bg-secondary);
    border-radius: clamp(20px, 5vw, 50px);
    overflow: hidden;
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
    transition: var(--transition-normal);
    border: 2px solid var(--border-color);
    position: relative;
    width: 100%;
    min-height: 50px;
}

.search-box:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(139, 92, 246, 0.4);
    border-color: var(--primary-color);
}

.dream-input {
    flex: 1;
    padding: clamp(0.8rem, 2vw, 1.2rem) clamp(1rem, 3vw, 2rem);
    border: none;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    outline: none;
    background: transparent;
    color: var(--text-primary);
    min-width: 0;
}

.dream-input::placeholder {
    color: var(--text-muted);
}

.dream-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    padding: clamp(0.8rem, 2vw, 1.2rem) clamp(1.5rem, 3vw, 2.5rem);
    background: var(--gradient-gold);
    border: none;
    color: white;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: fit-content;
}

.search-btn:hover {
    background: linear-gradient(135deg, #fda085 0%, #f6d365 100%);
    transform: scale(1.05);
}

.search-btn:active {
    transform: scale(0.98);
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

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

.suggestion {
    background: rgba(139, 92, 246, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-block;
    margin: 0.3rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-weight: 500;
    color: var(--text-primary);
}

.suggestion:hover {
    background: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px) scale(1.08);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3), 0 0 20px rgba(139, 92, 246, 0.2);
}

/* Result Container */
.result-container {
    margin-top: 3rem;
    animation: fadeIn 0.5s ease-in;
}

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

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


.result-card {
    background: white;
    border-radius: clamp(12px, 2vw, 20px);
    padding: clamp(1.2rem, 3vw, 2.5rem);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.4s ease;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 100%;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed rgba(99, 102, 241, 0.2);
    position: relative;
}


.result-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.result-title {
    font-size: 1.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

.dream-text {
    background: var(--bg-tertiary) !important;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    color: var(--text-primary) !important;
    font-weight: 500;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dream-text * {
    color: var(--text-primary) !important;
}

.dream-text strong {
    color: var(--text-primary) !important;
}

.interpretation {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    line-height: 1.8;
    color: var(--text-secondary) !important;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.interpretation p {
    color: var(--text-secondary) !important;
    margin: 0;
}

.numbers-container {
    background: var(--gradient-gold);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.15);
    position: relative;
}

.numbers-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100px, 40vw), 1fr));
    gap: clamp(0.5rem, 2vw, 1rem);
    width: 100%;
}

.number-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    transition: var(--transition-fast);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.number-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
    border-color: var(--gold-color);
}

.number-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
}

.number-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--warning-color);
    font-family: 'Poppins', sans-serif;
}

.shio-badge {
    background: var(--gradient-1);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

/* Features Section */
.features {
    padding: clamp(2rem, 5vw, 4rem) 0;
    background: var(--bg-secondary);
    margin-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    padding: 0 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
}

.feature-card {
    text-align: center;
    padding: clamp(1.2rem, 3vw, 2rem);
    border-radius: clamp(12px, 2vw, 20px);
    background: var(--bg-tertiary);
    transition: var(--transition-normal);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    color: var(--primary-color);
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* Popular Dreams Section */
.popular-dreams {
    padding: clamp(2rem, 5vw, 4rem) 0;
    background: var(--bg-primary);
}

.dreams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
}

.dream-card {
    background: var(--bg-secondary);
    padding: clamp(1.2rem, 3vw, 1.8rem);
    border-radius: clamp(12px, 2vw, 20px);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    cursor: pointer;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.dream-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.3);
    background: var(--bg-tertiary);
}

.dream-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-transform: capitalize;
}

.dream-numbers {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.number-badge {
    background: var(--gradient-gold);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    transition: var(--transition-fast);
}

.number-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.dream-preview {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* How It Works */
.how-it-works {
    padding: clamp(2rem, 5vw, 4rem) 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: clamp(2rem, 4vw, 3rem);
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
    position: relative;
    transition: var(--transition-normal);
}

.step:hover .step-number {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.step h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

/* About Section */
.about {
    padding: clamp(2rem, 5vw, 4rem) 0;
    background: var(--bg-primary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.about-content strong {
    color: var(--danger-color);
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: clamp(2rem, 4vw, 3rem) 0 clamp(1rem, 2vw, 1.5rem);
    margin-top: clamp(2rem, 4vw, 3rem);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    width: 100%;
}

.footer-info h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links h5,
.footer-contact h5 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

.footer-links a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Performance optimizations */
* {
    -webkit-tap-highlight-color: transparent;
}

.search-box,
.feature-card,
.dream-card,
.number-item {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* CRITICAL FIX - Interpretation Text Visibility */
body .result-card .interpretation p,
body .result-container .interpretation p,
body div.interpretation p,
body .interpretation,
.interpretation {
    color: #e5e5e5 !important;
    background: transparent !important;
}

/* Utility Classes for Maximum Flexibility */
.w-full { width: 100%; }
.h-full { height: 100%; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }

/* Responsive Text Utilities */
.text-responsive-sm { font-size: clamp(0.75rem, 2vw, 0.9rem); }
.text-responsive-md { font-size: clamp(0.9rem, 2.5vw, 1.1rem); }
.text-responsive-lg { font-size: clamp(1.1rem, 3vw, 1.3rem); }
.text-responsive-xl { font-size: clamp(1.3rem, 4vw, 1.6rem); }

/* Spacing Utilities */
.p-responsive { padding: clamp(1rem, 3vw, 2rem); }
.m-responsive { margin: clamp(1rem, 3vw, 2rem); }
.gap-responsive { gap: clamp(0.5rem, 2vw, 1rem); }

/* Flexible Containers */
.container-fluid {
    width: 100%;
    max-width: 100vw;
    padding: 0 clamp(12px, 3vw, 24px);
    margin: 0 auto;
    box-sizing: border-box;
}

.flex-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 2rem);
    align-items: flex-start;
}

.grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
}

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

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Dream Text Override - Dark Theme */
.result-card .dream-text,
.result-container .dream-text,
div.dream-text {
    color: var(--text-primary) !important;
    background: var(--bg-tertiary) !important;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.result-card .dream-text *,
.result-container .dream-text *,
div.dream-text * {
    color: var(--text-primary) !important;
}

.result-card .dream-text strong,
.result-container .dream-text strong,
div.dream-text strong {
    color: var(--text-primary) !important;
}

/* Interpretation Text Override - Force Light Gray Color */
.result-card .interpretation,
.result-container .interpretation,
div.interpretation {
    color: #e5e5e5 !important;
    background: var(--bg-primary) !important;
}

.result-card .interpretation p,
.result-container .interpretation p,
div.interpretation p {
    color: #e5e5e5 !important;
}

.result-card .interpretation *,
.result-container .interpretation *,
div.interpretation * {
    color: #e5e5e5 !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Fine-tuning */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .search-box {
        flex-direction: column;
    }

    .search-btn {
        border-radius: 0 0 16px 16px;
    }

    .numbers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .search-box {
        border-radius: 12px;
    }

    .search-btn {
        border-radius: 0 0 10px 10px;
    }

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