:root {
    --bg-color: #f9f7f1; /* Creamy paper */
    --text-color: #2d2d2d; /* Pencil lead grey */
    --accent-pink: #ff6b6b;
    --accent-blue: #4ecdc4;
    --accent-yellow: #ffe66d;
    --accent-purple: #6c5ce7;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: var(--bg-color);
    /* Dot Grid Pattern */
    background-image: radial-gradient(#d1d1d1 1px, transparent 1px);
    background-size: 20px 20px;
    background-attachment: fixed; /* Keeps dots static while scrolling */
    font-family: 'Fredoka', sans-serif;
    color: var(--text-color);
    cursor: none; /* Custom cursor */
    overflow-x: hidden;
}

/* Mobile cursor adjustment */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }
    #cursor {
        display: none;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Fredoka', sans-serif;
    letter-spacing: -1px;
}

.handwritten {
    font-family: 'Patrick Hand', cursive;
    display: inline-block;
}

.mono {
    font-family: 'Space Mono', monospace;
}

/* Custom Cursor */
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background-color: var(--text-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background-color 0.2s;
    mix-blend-mode: multiply;
    opacity: 0.8;
}

#cursor.hovered {
    width: 80px;
    height: 80px;
    background-color: var(--accent-pink);
    opacity: 0.5;
}

/* Canvas Layer */
#sketch-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Buttons and Interactions */
.fun-btn {
    background: var(--accent-purple);
    color: white;
    font-weight: bold;
    border: 2px solid var(--text-color);
    padding: 10px 25px;
    border-radius: 10px;
    cursor: none;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 4px 4px 0px var(--text-color);
    display: inline-block;
}

.fun-btn:hover {
    transform: scale(1.05) translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--text-color);
    background: var(--accent-pink);
}

.fun-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px var(--text-color);
}

/* Sticker Box */
.sticker-box {
    background: white;
    padding: 1.5rem;
    border: 3px solid var(--text-color);
    border-radius: 15px;
    box-shadow: 8px 8px 0px var(--text-color);
    transition: transform 0.2s;
    position: relative;
}

.sticker-box:hover {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0px var(--text-color);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(249, 247, 241, 0.95), rgba(249, 247, 241, 0.85));
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(0,0,0,0.06);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

nav .nav-logo {
    pointer-events: auto;
}

nav .nav-logo img {
    max-width: clamp(200px, 20vw, 260px);
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
    padding: 0.75rem 1rem;
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

nav .nav-content {
    pointer-events: auto;
    background: white;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--text-color);
    border-radius: 18px;
    box-shadow: 4px 4px 0px var(--text-color);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    width: min(960px, 100%);
}

@media (max-width: 768px) {
    nav {
        padding: 0.5rem;
        flex-direction: column;
        gap: 0.65rem;
        align-items: center;
    }
    
    nav .nav-content {
        font-size: 0.95rem;
        gap: 0.6rem 0.8rem;
        padding: 0.6rem 0.9rem;
        justify-content: center;
        text-align: center;
        width: 100%;
    }
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    cursor: none;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .nav-link {
        font-size: 0.9rem;
    }
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-pink);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-anim {
    animation: float 4s ease-in-out infinite;
}

@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin-slow {
    animation: spin-slow 12s linear infinite;
}

.scribble path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw 2s ease forwards;
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

/* Grid Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* Custom Audio Player */
.custom-player {
    background: linear-gradient(135deg, #fff, #f3f4ff);
    border: 3px solid var(--text-color);
    border-radius: 18px;
    box-shadow: 6px 6px 0px var(--text-color);
    padding: 1.5rem;
    transition: transform 0.2s;
}

.custom-player:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px var(--text-color);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--text-color);
    background: var(--accent-purple);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0px var(--text-color);
    flex-shrink: 0;
}

.play-btn:hover {
    transform: scale(1.05);
    background: var(--accent-pink);
}

.play-btn:active {
    transform: scale(0.95);
    box-shadow: 2px 2px 0px var(--text-color);
}

.play-btn i {
    font-size: 1.25rem;
}

.player-info {
    flex-grow: 1;
    min-width: 0;
}

.track-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 0.85rem;
    color: #666;
    font-family: 'Space Mono', monospace;
}

.progress-bar-container {
    width: 100%;
    min-height: 16px;
    background: #d4d4d4;
    border-radius: 12px;
    border: 3px solid var(--text-color);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.2);
    display: block;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #ff6b6b);
    border-radius: 6px;
    width: 0%;
    transition: width 0.1s linear;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    box-shadow: 0 0 12px rgba(108, 92, 231, 0.6);
    min-height: 16px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.5rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #ddd;
}

.volume-control i {
    color: var(--accent-purple);
}

.volume-slider {
    flex-grow: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 10px;
    border: 2px solid var(--text-color);
    cursor: pointer;
    position: relative;
}

.volume-level {
    height: 100%;
    background: var(--accent-purple);
    border-radius: 8px;
    width: 80%;
}

@media (max-width: 768px) {
    .custom-player {
        padding: 1rem;
    }
    
    .player-controls {
        gap: 0.75rem;
    }
    
    .play-btn {
        width: 45px;
        height: 45px;
    }
    
    .track-title {
        font-size: 1rem;
    }
}

/* Sea Wave Effect */
/* Bubble effect */
@keyframes bubble-float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) scale(0.5);
        opacity: 0;
    }
}

.bubble {
    position: fixed;
    bottom: -50px;
    background: radial-gradient(circle at 30% 30%, rgba(78, 205, 196, 0.3), rgba(78, 205, 196, 0.1));
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: bubble-float linear infinite;
}

/* Storyboard strip keeps vertical overflow visible */
.storyboard-strip {
    overflow-x: auto;
    overflow-y: visible;
}

/* Animated progress bar */
.progress-animate {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    animation: progress-pulse 3s ease-in-out infinite;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.15);
}

@keyframes progress-pulse {
    0% { width: 0%; opacity: 0.8; }
    50% { width: 18%; opacity: 1; }
    100% { width: 15%; opacity: 0.9; }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .sticker-box {
        padding: 1rem;
    }
    
    .fun-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}
