/* Dream Meaning AI - Premium Mystical Theme */
:root {
    --primary-color: #FFD700;
    --primary-hover: #FDB931;
    --secondary-color: #9D4EDD;
    --secondary-hover: #7B2CBF;
    --bg-dark: #0F0C29;
    --bg-gradient: radial-gradient(circle at 50% 10%, #302b63, #0f0c29 60%, #000000 100%);
    --card-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-light: #F8F9FA;
    --text-muted: #BDBDBD;
    --text-gold: #FFECB3;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 215, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    background-image: var(--bg-gradient);
    color: var(--text-light);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(to right, #FFD700, #FDB931, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-gold);
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 80px 20px 60px;
}

header p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    background: rgba(0,0,0,0.3);
    padding: 10px 0;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb span {
    color: var(--primary-color);
}

/* Main Input Section */
.dream-input-section {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 50px;
    max-width: 900px;
    margin: 0 auto 60px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative glow behind the card */
.dream-input-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(157, 78, 221, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

textarea {
    width: 100%;
    min-height: 180px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    color: #fff;
    padding: 20px;
    font-size: 1.2rem;
    font-family: var(--font-body);
    resize: vertical;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

/* Magic Button */
.magic-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border: none;
    padding: 18px 50px;
    font-size: 1.3rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-heading);
    box-shadow: var(--shadow-glow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.magic-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
}

.magic-btn:active {
    transform: translateY(1px);
}

/* Result Section */
#result-container {
    display: none;
    max-width: 900px;
    margin: 0 auto;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.result-card {
    background: rgba(20, 18, 50, 0.9);
    border: 1px solid var(--secondary-color);
    border-radius: 24px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    position: relative;
}

.interpretation-text {
    font-size: 1.2rem;
    line-height: 1.9;
    text-align: left;
    color: #E2E8F0;
}

.interpretation-text h3 {
    margin-top: 25px;
}

/* Categories Grid */
.keyword-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.keyword-category {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.keyword-category:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    background: rgba(157, 78, 221, 0.05);
}

.keyword-category h3, .keyword-category h4 {
    font-size: 1.4rem;
    color: var(--text-gold);
    border-bottom: 2px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* SEO List Styling */
.seo-list li {
    list-style: none;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.seo-list li::before {
    content: '✦';
    color: var(--secondary-color);
    margin-right: 10px;
}

/* Footer & dictionary */
.dream-dictionary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.dream-link {
    background: rgba(255,255,255,0.05);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.dream-link:hover {
    background: var(--secondary-color);
    color: #fff;
    text-shadow: none;
}

/* Loaders and Orbs */
.number-orb {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #9D4EDD, #3a0ca3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.4rem;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.4);
    border: 2px solid rgba(255,255,255,0.2);
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 30px auto;
    display: none;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .dream-input-section { padding: 30px 20px; }
    .magic-btn { width: 100%; padding: 15px; }
    textarea { height: 150px; }
}