:root {
    --bg-color: #fff0f5;
    /* Lavender Blush - Very soft pink */
    --text-color: #5d4037;
    /* Warm Brown */
    --accent-color: #ffb7b2;
    /* Melon */
    --secondary-accent: #ff9e99;
    /* Light Salmon */
    --card-bg: #ffffff;
    --tech-overlay: rgba(255, 255, 255, 0.8);
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --shadow-soft: 0 10px 30px rgba(255, 183, 178, 0.2);
    --glow: 0 0 20px rgba(255, 183, 178, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.5s ease;
}

/* Utilities */
.hidden {
    display: none !important;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Boot Screen */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #1a1a1a;
    /* Darker for contrast */
    color: #ffb7b2;
    font-family: var(--font-mono);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.terminal-container {
    text-align: left;
    font-size: 1.2rem;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Main Content Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header/Hero */
#hero {
    padding: 6rem 0 2rem;
}

h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.badge {
    font-size: 0.8rem;
    background-color: var(--secondary-accent);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    vertical-align: middle;
    font-family: var(--font-mono);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Appreciation Cards - Visual Update */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.visual-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 3rem 1rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 183, 178, 0.15);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-align: center;
}

.visual-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(255, 183, 178, 0.3);
    background: white;
}

.visual-card .huge-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.visual-card:hover .huge-icon {
    transform: scale(1.2) rotate(10deg);
}

.visual-card h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Secondary Button (for Minigame launch) */
.secondary-button {
    background: transparent;
    border: 2px solid var(--secondary-accent);
    color: var(--secondary-accent);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    font-family: var(--font-main);
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.secondary-button:hover {
    background: var(--secondary-accent);
    color: white;
}

/* Minigame Styles */
#game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 240, 245, 0.95);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-ui {
    position: absolute;
    top: 20px;
    width: 90%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    z-index: 100;
}

#game-area {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.game-heart {
    position: absolute;
    font-size: 3rem;
    cursor: pointer;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    transition: transform 0.1s;
}

.game-heart:active {
    transform: scale(0.9);
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.icon-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
}

#game-over-screen {
    position: absolute;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    animation: popIn 0.5s ease;
}

#game-over-screen h2 {
    font-size: 2.5rem;
    color: var(--secondary-accent);
}

.small {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    margin: 0.5rem;
}

.game-over-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Interactive Hug Button */
#hug-interaction {
    padding: 4rem 0;
}

.hug-container {
    position: relative;
    display: inline-block;
}

.glow-button {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    border: none;
    padding: 1.5rem 3rem;
    border-radius: 50px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-soft);
}

.glow-button:hover {
    transform: scale(1.05);
}

.glow-button:active {
    transform: scale(0.95);
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.glow-button:hover .btn-glow {
    opacity: 1;
    transform: scale(1);
}

.instruction {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: var(--font-mono);
}

/* Profile Panel */
.profile-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--accent-color);
    max-width: 500px;
    margin: 0 auto;
    box-shadow: var(--shadow-soft);
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.avatar-placeholder {
    font-size: 3rem;
    margin-right: 1rem;
}

.stats-list {
    list-style: none;
    text-align: left;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px dashed rgba(93, 64, 55, 0.2);
}

.stats-list li:last-child {
    border-bottom: none;
}

.stats-list .label {
    font-weight: 600;
}

.stats-list .value {
    font-family: var(--font-mono);
    color: var(--secondary-accent);
}

/* Hug Letter */
#letter {
    padding: 4rem 0;
}

.letter-content {
    background: #fff;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    font-family: 'Georgia', serif;
    /* More handwritten feel alternative */
    font-size: 1.1rem;
    line-height: 1.8;
    position: relative;
}

.letter-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--accent-color);
    border-radius: 8px 8px 0 0;
}

/* Cozy Ending */
#ending {
    padding: 3rem 0;
    opacity: 0.8;
}

.looping-heart {
    font-size: 2rem;
    animation: heartbeat 2s infinite ease-in-out;
    margin-bottom: 1rem;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(93, 64, 55, 0.3);
    /* Warm brown transparent */
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Particle Effects Container */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1500;
}

.particle {
    position: absolute;
    pointer-events: none;
    animation: floatUp 3s linear forwards;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translateY(0) scale(1.2);
        opacity: 0;
    }
}

/* Custom Cursor Glow */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(600px circle at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(255, 183, 178, 0.15), transparent 40%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .profile-panel {
        padding: 1.5rem;
    }

    .glow-button {
        padding: 1rem 2rem;
        font-size: 1.2rem;
    }
}