@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #f7f9fc;
    --card-bg: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --accent-1: #ffb6b9; /* pastel red/pink */
    --accent-2: #fae3d9; /* pastel peach */
    --accent-3: #bbded6; /* pastel green */
    --accent-4: #8ac6d1; /* pastel blue */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --border-radius: 24px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.bento-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 200px);
    gap: 20px;
    max-width: 1000px;
    width: 100%;
}

.bento-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Card Sizes */
.card-profile {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, var(--accent-2), #ffffff);
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-canvas {
    grid-column: span 2;
    grid-row: span 2;
    padding: 0;
}

.card-pet {
    grid-column: span 1;
    grid-row: span 1;
    background-color: var(--accent-1);
    color: white;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.card-music {
    grid-column: span 2;
    grid-row: span 1;
    background-color: var(--accent-3);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.card-links {
    grid-column: span 1;
    grid-row: span 1;
    background-color: var(--accent-4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Profile Elements */
.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-bio {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Canvas Elements */
.canvas-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

#drawing-canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.btn-clear {
    background: var(--accent-1);
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

/* Pet Counter */
.pet-emoji {
    font-size: 4rem;
    margin-bottom: 10px;
    transition: transform 0.1s;
}
.pet-emoji:active {
    transform: scale(0.9);
}
.pet-count {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Music Player */
.music-info {
    display: flex;
    flex-direction: column;
}
.music-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a4d41;
}
.music-artist {
    color: #2b7a68;
    font-size: 0.9rem;
}
.music-controls button {
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--accent-3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Links */
.link-btn {
    width: 100%;
    padding: 10px;
    background: white;
    color: var(--accent-4);
    text-decoration: none;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    transition: background 0.2s;
}
.link-btn:hover {
    background: rgba(255,255,255,0.8);
}

/* Back Button */
.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--card-bg);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    z-index: 100;
}
.back-btn:hover {
    transform: translateX(-5px);
}

@media (max-width: 900px) {
    .bento-container {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    .card-music {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .bento-container {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .card-profile, .card-canvas, .card-music {
        grid-column: span 1;
    }
    .card-canvas {
        height: 300px;
    }
}
