/* CSS Variables for design tokens (Light Theme) */
:root {
    --bg-dark: #faf9f6;      /* Off-white / Cream background */
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --border-color: rgba(243, 156, 18, 0.2);
    --border-hover: rgba(243, 156, 18, 0.5);
    
    --primary: #F39C12;      /* Golden Yellow/Amber (readable on light background) */
    --primary-bg: #FFD32D;   /* Bright Yellow for fills */
    --primary-hover: #e08e0b;
    --primary-glow: rgba(243, 156, 18, 0.25);
    
    --secondary: #f0f1f5;
    --secondary-hover: #e1e3ec;
    
    --text-main: #1e2229;    /* Dark Charcoal text */
    --text-muted: #5e6675;   /* Gray text */
    --text-dark: #0c0d10;
    
    --card-glow: rgba(243, 156, 18, 0.05);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

/* Typography elements */
h1, h2, h3, .logo {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
}

/* Custom Selection */
::selection {
    background-color: var(--primary-bg);
    color: var(--text-dark);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #e2e4eb;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Interactive Background Blobs Container to prevent layout shifting */
.background-blobs-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 211, 45, 0.15) 0%, rgba(255, 211, 45, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(50px);
    animation: floatBlob 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: 10%;
    left: -100px;
}

.blob-2 {
    top: 45%;
    right: -150px;
    animation-delay: -5s;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.12) 0%, rgba(255, 193, 7, 0) 70%);
}

.blob-3 {
    bottom: 5%;
    left: 20%;
    animation-delay: -10s;
    background: radial-gradient(circle, rgba(243, 156, 18, 0.1) 0%, rgba(243, 156, 18, 0) 70%);
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(50px, 40px) scale(1.15);
    }
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: rgba(250, 249, 246, 0.8);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
}

.logo {
    font-size: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
    font-weight: 800;
}

.logo span {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.15);
}

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition-fast);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-main);
}

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

/* Main Container spacing */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    overflow: hidden;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding: 8rem 0 4rem 0;
}

.hero-content {
    flex: 1.2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(243, 156, 18, 0.08);
    border: 1px solid rgba(243, 156, 18, 0.15);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.highlight {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.1);
}

.hero-content h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-content h2 span {
    color: var(--text-main);
    font-weight: 600;
    border-right: 2px solid var(--primary);
    padding-right: 4px;
    animation: blinkCursor 0.8s steps(2, start) infinite;
}

@keyframes blinkCursor {
    from, to { border-color: transparent }
    50% { border-color: var(--primary); }
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Button UI Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-bg);
    color: var(--text-dark);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(243, 156, 18, 0.2);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-main);
    border-color: rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn-accent {
    background-color: rgba(243, 156, 18, 0.08);
    color: var(--primary);
    border-color: rgba(243, 156, 18, 0.25);
}

.btn-accent:hover {
    background-color: var(--primary-bg);
    color: var(--text-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.1);
}

.w-100 {
    width: 100%;
}

/* Hero Avatar */
.hero-image-wrapper {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.avatar-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 211, 45, 0.3) 0%, rgba(255, 211, 45, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    animation: rotateGlow 10s linear infinite;
}

.hero-avatar {
    position: relative;
    z-index: 2;
    width: 320px;
    height: 320px;
    border-radius: 40px;
    border: 3px solid rgba(243, 156, 18, 0.2);
    object-fit: cover;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform: rotate(-3deg);
    transition: var(--transition-normal);
}

.hero-avatar:hover {
    transform: rotate(0deg) scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(243, 156, 18, 0.2);
}

@keyframes rotateGlow {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.1) translate(10px, -10px); }
    100% { transform: scale(1) translate(0, 0); }
}

/* Section Header */
.playground-section {
    padding: 6rem 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Grid & Cards */
.playground-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Card Styles with Glassmorphism (Light Theme) */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(243, 156, 18, 0.04), transparent 40%);
    z-index: 1;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px rgba(243, 156, 18, 0.1);
}

.toy-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(243, 156, 18, 0.08);
    border-radius: 12px;
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Input Fields inside Cards */
input[type="text"] {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
    margin-bottom: 1rem;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.1);
}

/* Vibe Selector Buttons */
.vibe-selectors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.vibe-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.vibe-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-main);
}

.vibe-btn.active {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Result Card Container */
.card-result-container {
    margin-top: 1.5rem;
    perspective: 1000px;
    opacity: 1;
    transition: all 0.5s ease;
}

.card-result-container.hidden {
    display: none;
    opacity: 0;
}

/* Dynamic Magic Card Design */
.magic-card {
    background: linear-gradient(135deg, #ffffff 0%, #fefcf7 100%);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    text-align: center;
    box-shadow: 0 8px 24px rgba(243, 156, 18, 0.15);
    animation: floatCard 4s ease-in-out infinite;
}

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

.card-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(243, 156, 18, 0.08) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    pointer-events: none;
    border-radius: 10px;
}

.card-decor {
    position: absolute;
    color: var(--primary);
    font-size: 0.8rem;
    opacity: 0.6;
}
.decor-tl { top: 10px; left: 10px; }
.decor-tr { top: 10px; right: 10px; }
.decor-bl { bottom: 10px; left: 10px; }
.decor-br { bottom: 10px; right: 10px; }

.card-content {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.5;
    font-style: italic;
    margin-bottom: 1.5rem !important;
}

.card-signature {
    font-family: 'Sora', sans-serif;
    color: var(--primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
}

/* Food Fueler Styling */
.fuel-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.fuel-btn {
    flex: 1 1 calc(50% - 0.5rem);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.fuel-status-box {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 4px solid var(--primary);
}

.fuel-status-box p {
    margin: 0 !important;
    font-size: 0.95rem;
    color: var(--text-main);
}

/* Fun Meter Details */
.meter-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.meter-track {
    flex: 1;
    height: 14px;
    background: #eaecf2;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.meter-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffc107 0%, #ffde4d 100%);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
    border-radius: 10px;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.meter-percentage {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    min-width: 50px;
    text-align: right;
}

/* Footer Section */
.love-section {
    padding: 6rem 0 4rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.love-container {
    max-width: 600px;
    margin: 0 auto;
}

.heart-pulse {
    font-size: 2.5rem;
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
    margin-bottom: 1.5rem;
    animation: heartPulse 1.2s infinite;
}

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

.love-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

#changing-love {
    display: block;
    margin: 0.5rem auto 0 auto;
    height: 3rem;
    line-height: 3rem;
    font-size: 2rem;
    white-space: nowrap;
    text-align: center;
    transition: opacity 0.2s ease;
    will-change: opacity;
    transform: translate3d(0, 0, 0);
}

.love-section p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 0;
}

.credits {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dev-sign {
    color: var(--primary);
    font-weight: 600;
}

/* Realistic Coffee Splat SVG Styling */
.coffee-splat-container {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 250px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.25));
    transform: scale(0);
    opacity: 0.9;
    animation: coffeeSplatAnim 2.0s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.coffee-splat-svg {
    width: 100%;
    height: 100%;
    fill: #2d1a10; /* Realistic deep black coffee color */
}

@keyframes coffeeSplatAnim {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0.9;
    }
    10% {
        transform: scale(1.1) rotate(5deg);
    }
    15% {
        transform: scale(1) rotate(0deg);
    }
    85% {
        transform: scale(1) translateY(0) rotate(0deg);
        opacity: 0.9;
    }
    100% {
        transform: scale(0.95) translateY(60px) rotate(-3deg);
        opacity: 0;
    }
}


/* Food Blast Styling */
.food-blast-item {
    position: fixed;
    font-size: 2rem;
    z-index: 10000;
    pointer-events: none;
    user-select: none;
}

.bank-alert-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #ffffff;
    border: 2px solid #e74c3c; /* Alert red */
    border-radius: 12px;
    padding: 1.25rem;
    max-width: 320px;
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.15), 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 10001;
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    opacity: 0;
}

.bank-alert-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.bank-alert-close:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.08);
}

.bank-alert-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.bank-alert-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e74c3c;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.bank-alert-body {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-main);
}

/* Select fields styling inside cards */
.card select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition-fast);
}

.card select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Console Output terminal styles */
.console-output {
    background-color: #1e1e24; /* Dark code console background */
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
    transition: opacity 0.3s ease;
    text-align: left;
}

.console-output.hidden {
    display: none;
}

.console-header {
    background-color: #2b2b35;
    padding: 0.5rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.console-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.console-header .dot.red { background-color: #ff5f56; }
.console-header .dot.yellow { background-color: #ffbd2e; }
.console-header .dot.green { background-color: #27c93f; }

.console-title {
    color: #a9b7c6;
    font-size: 0.75rem;
    font-family: 'Courier New', Courier, monospace;
    margin-left: 0.5rem;
}

.console-body {
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #a9b7c6;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.4;
}

.console-log-line {
    margin-bottom: 0.3rem;
    word-break: break-all;
}

.console-log-line.info { color: #57a64a; }
.console-log-line.warn { color: #dcdcaa; }
.console-log-line.error { color: #f48771; }
.console-log-line.success { color: #4fc1ff; font-weight: 700; }

/* Widescreen console workspace layout */
#toy-work-console {
    grid-column: 1 / -1; /* Spans full width of the playground grid */
}

#toy-work-console .console-workspace {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    margin-top: 1.5rem;
    text-align: left;
}

#toy-work-console .toy-controls {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#toy-work-console .console-output {
    flex: 1.2;
    min-width: 0;
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
}

#toy-work-console .console-body {
    flex: 1;
    min-height: 180px;
}

/* Responsive styling */
@media (max-width: 968px) {
    #toy-work-console .console-workspace {
        flex-direction: column;
    }
    #toy-work-console .console-output {
        width: 100%;
        min-width: 0 !important;
        margin-top: 1.5rem !important;
    }

    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        padding-top: 6rem;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .hero-content h2 {
        min-height: 2.8rem;
    }
    
    .hero-desc {
        margin: 0 auto 2rem auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0;
    }
    .nav-links {
        display: none;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content h2 {
        font-size: 1.4rem;
        min-height: 4.5rem;
        margin-bottom: 1.5rem;
    }
    .hero-avatar {
        width: 250px;
        height: 250px;
    }
    .avatar-glow {
        width: 250px;
        height: 250px;
    }
    .playground-grid {
        grid-template-columns: 1fr;
    }
    .love-section {
        padding: 3rem 1.5rem;
    }
    #changing-love {
        height: 2.5rem;
        line-height: 2.5rem;
        font-size: 1.8rem;
    }
}
