:root {
    --primary-yellow: #fff9c4;
    --light-yellow: #fffde7;
    --accent-orange: #ff7043;
    --accent-brown: #5d4037;
    --text-color: #3e2723;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 112, 67, 0.3);
    --tile-bg: rgba(255, 255, 255, 0.5);
}

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

body {
    font-family: 'Pretendard', sans-serif;
    background: linear-gradient(135deg, #fffde7, #fff176);
    color: var(--text-color);
    line-height: 1.6;
    overflow: hidden; /* Prevent scrolling outside bento */
    height: 100vh;
}

#sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Dashboard Layout */
#dashboard {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.8rem;
    font-family: 'Nanum Square Round', sans-serif;
}

.header h1 span {
    font-size: 1.2rem;
    color: var(--accent-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 160px);
    gap: 20px;
    grid-template-areas: 
        "identity identity interests interests"
        "identity identity panda panda"
        "life life future future";
}

.tile {
    background: var(--tile-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(255,112,67,0.1);
}

.tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 112, 67, 0.05);
    opacity: 0;
    transition: opacity 0.3s;
}

.tile:hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 25px rgba(255,112,67,0.2);
}

.tile:hover::after {
    opacity: 1;
}

.tile-content {
    text-align: center;
}

.emoji {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.tile h2 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--accent-brown);
}

.tile p {
    font-size: 0.9rem;
    color: #6d4c41;
}

/* Grid Areas */
.tile-identity { grid-area: identity; }
.tile-interests { grid-area: interests; }
.tile-panda { grid-area: panda; background: rgba(255, 112, 67, 0.15); }
.tile-life { grid-area: life; }
.tile-future { grid-area: future; }

/* Overlay & Detail Sections */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 253, 231, 0.8);
    backdrop-filter: blur(20px);
    z-index: 100;
    display: none; /* Controlled by JS */
    opacity: 0;
    transition: opacity 0.5s ease;
    align-items: center;
    justify-content: center;
}

.overlay.active {
    display: flex;
    opacity: 1;
}

.overlay-content {
    width: 100%;
    max-width: 800px;
    padding: 40px;
    max-height: 90vh;
    overflow-y: auto;
}

.detail-section {
    display: none;
}

.detail-section.active {
    display: block;
    animation: fadeIn 0.6s ease;
}

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

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    background: none;
    border: none;
    color: var(--accent-brown);
    cursor: pointer;
    transition: transform 0.3s;
}

.close-btn:hover {
    transform: rotate(90deg);
    color: var(--accent-orange);
}

/* Reusing Glass Card Styles */
.glass-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 50px;
    text-align: center;
}

/* Other reused styles ... */
.panda-image { width: 200px; height: 200px; border-radius: 50%; border: 5px solid var(--accent-orange); object-fit: cover; }
.goods-box { background: rgba(255,255,255,0.3); padding: 15px; border-radius: 12px; margin-top: 15px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.commute-box { background: rgba(255,255,255,0.2); padding: 20px; border-radius: 12px; margin-top: 20px; }

/* Sakura Petals (Modified for leaf/autumn theme) */
.sakura {
    position: absolute;
    width: 15px; height: 10px;
    background-color: #ffd54f;
    border-radius: 50% 0 50% 0;
    animation: fall linear infinite;
}

@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.7; }
    100% { transform: translateY(110vh) translateX(100px) rotate(720deg); opacity: 0; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body { overflow-y: auto; height: auto; }
    #dashboard { height: auto; padding-top: 60px; }
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas: none;
    }
    .tile { height: 150px; }
    .tile-identity { height: 250px; }
    .overlay-content { padding: 20px; }
}
