@import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&display=swap');

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

body {
    font-family: 'VT323', monospace;
    background: linear-gradient(145deg, #2a2a3a 0%, #1a1a2a 50%, #0f0f1f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.scene-2005 {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.timestamp-2005 {
    position: absolute;
    top: -30px;
    right: -20px;
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: #ff6b35;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
    opacity: 0.8;
}

/* iPod Device Styles */
.ipod-device {
    position: relative;
    width: 200px;
    height: 340px;
    border-radius: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.ipod-white {
    background: linear-gradient(165deg, #f8f8f8 0%, #e8e8e8 30%, #d8d8d8 70%, #c8c8c8 100%);
}

.ipod-yellowed {
    background: linear-gradient(165deg, #f5f0e0 0%, #e8e0c8 30%, #d8d0b8 70%, #c8c0a8 100%);
}

.ipod-black {
    background: linear-gradient(165deg, #3a3a3a 0%, #2a2a2a 30%, #1a1a1a 70%, #0a0a0a 100%);
}

.ipod-u2 {
    background: linear-gradient(165deg, #1a1a1a 0%, #0f0f0f 30%, #050505 70%, #000000 100%);
}

/* Wear Overlay */
.wear-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(255,255,255,0.1) 50%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(0,0,0,0.05) 50%, transparent 52%);
    pointer-events: none;
}

.wear-overlay::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 10%;
    width: 40%;
    height: 2px;
    background: rgba(0,0,0,0.05);
    transform: rotate(-5deg);
}

/* Smudges Overlay */
.smudges-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 60%, rgba(255,255,255,0.08) 0%, transparent 40%);
    pointer-events: none;
}

/* Hold Switch */
.hold-switch-container {
    position: absolute;
    top: 8px;
    right: 15px;
}

.hold-switch {
    width: 30px;
    height: 10px;
    background: #888;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.hold-slider {
    position: absolute;
    width: 15px;
    height: 10px;
    background: linear-gradient(180deg, #ddd 0%, #aaa 100%);
    border-radius: 2px;
    left: 0;
    transition: left 0.2s ease;
}

.hold-switch.active .hold-slider {
    left: 15px;
}

.hold-orange {
    position: absolute;
    left: 0;
    top: 0;
    width: 15px;
    height: 10px;
    background: #ff6b00;
}

/* Screen Bezel */
.screen-bezel {
    width: 170px;
    height: 128px;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 4px;
    margin-top: 20px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

/* iPod Screen */
.ipod-screen {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    font-family: 'VT323', monospace;
}

.backlight-on {
    background: linear-gradient(180deg, #4a7cc7 0%, #3a6cb7 50%, #2a5ca7 100%);
    box-shadow: 0 0 30px rgba(74, 124, 199, 0.3);
}

.backlight-off {
    background: linear-gradient(180deg, #2a3c47 0%, #1a2c37 50%, #0a1c27 100%);
}

/* Scanlines effect */
.ipod-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
}

/* Boot Screen */
.boot-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #333;
}

.apple-logo {
    font-size: 40px;
    margin-bottom: 20px;
    color: #666;
}

.boot-progress-container {
    width: 80%;
    height: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    overflow: hidden;
}

.boot-progress {
    height: 100%;
    background: linear-gradient(90deg, #666 0%, #888 100%);
    transition: width 0.1s ease;
}

.sad-ipod {
    color: #333;
}

.sad-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.sad-text {
    font-size: 14px;
}

/* Shuffle Screen */
.shuffle-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #111;
}

.shuffle-icon {
    font-size: 36px;
    animation: shuffle-bounce 0.5s ease infinite;
}

.shuffle-text {
    margin-top: 10px;
    font-size: 16px;
}

@keyframes shuffle-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Menu Screen */
.menu-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: linear-gradient(180deg, #fff 0%, #ddd 100%);
    border-bottom: 1px solid #999;
}

.header-title {
    font-size: 14px;
    font-weight: bold;
    color: #000;
}

.header-battery {
    font-size: 10px;
    color: #333;
}

.battery-icon {
    font-family: monospace;
    font-size: 8px;
    letter-spacing: -1px;
}

.menu-items {
    flex: 1;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 14px;
    color: #000;
    background: transparent;
    transition: all 0.1s ease;
}

.menu-item.selected {
    background: linear-gradient(180deg, #4a8cf7 0%, #2a6cd7 100%);
    color: #fff;
}

.menu-icon {
    width: 16px;
    margin-right: 6px;
    font-size: 12px;
}

.menu-name {
    flex: 1;
}

.menu-arrow {
    font-size: 10px;
    opacity: 0.8;
}

.nostalgia-tip {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    color: #333;
    background: rgba(255,255,255,0.5);
    padding: 2px;
}

/* Now Playing Screen */
.now-playing-screen {
    height: 100%;
    padding: 6px;
    display: flex;
    flex-direction: column;
    color: #000;
}

.np-header {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    margin-bottom: 4px;
}

.np-album-art {
    width: 48px;
    height: 48px;
    margin: 0 auto 4px;
    background: #333;
    border: 2px solid #666;
}

.album-art-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.np-title {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-artist, .np-album {
    font-size: 10px;
    text-align: center;
    opacity: 0.8;
}

.np-progress-container {
    position: relative;
    height: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    margin: 6px 0 2px;
    overflow: visible;
}

.np-progress {
    height: 100%;
    background: linear-gradient(90deg, #666 0%, #888 100%);
    border-radius: 4px;
}

.np-scrubber {
    position: absolute;
    top: -2px;
    width: 12px;
    height: 12px;
    background: linear-gradient(180deg, #fff 0%, #ccc 100%);
    border-radius: 50%;
    border: 1px solid #666;
    transform: translateX(-50%);
}

.np-time {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
}

/* About Screen */
.about-screen {
    height: 100%;
    padding: 8px;
    color: #000;
}

.about-title {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #666;
}

.about-item {
    font-size: 12px;
    margin-bottom: 2px;
}

.about-serial {
    margin-top: 8px;
    font-size: 10px;
    opacity: 0.7;
}

.about-footer {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    opacity: 0.6;
}

/* Brick Game Screen */
.brick-screen {
    height: 100%;
    padding: 4px;
    color: #000;
    display: flex;
    flex-direction: column;
}

.brick-title {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
}

.brick-area {
    flex: 1;
    background: rgba(0,0,0,0.1);
    margin: 4px 0;
    position: relative;
}

.brick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 4px;
}

.brick {
    height: 8px;
    background: #333;
    border-radius: 2px;
}

.brick.destroyed {
    opacity: 0;
}

.brick-paddle {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 6px;
    background: #333;
    border-radius: 2px;
}

.brick-ball {
    position: absolute;
    bottom: 20px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
}

.brick-score, .brick-help {
    font-size: 10px;
    text-align: center;
}

/* Click Wheel */
.click-wheel {
    width: 140px;
    height: 140px;
    background: linear-gradient(145deg, #f0f0f0 0%, #d0d0d0 50%, #c0c0c0 100%);
    border-radius: 50%;
    margin-top: 15px;
    position: relative;
    box-shadow: 
        inset 0 2px 10px rgba(0,0,0,0.1),
        0 4px 15px rgba(0,0,0,0.2);
    cursor: grab;
}

.click-wheel:active {
    cursor: grabbing;
}

.u2-wheel {
    background: linear-gradient(145deg, #c41e3a 0%, #a01830 50%, #801228 100%);
}

.wheel-button {
    position: absolute;
    background: transparent;
    border: none;
    font-size: 10px;
    font-family: 'VT323', monospace;
    cursor: pointer;
    padding: 5px 10px;
    color: #555;
    transition: all 0.1s ease;
}

.u2-wheel .wheel-button {
    color: #fff;
}

.wheel-button:hover {
    transform: scale(1.05);
}

.wheel-button:active {
    transform: scale(0.95);
}

.menu-btn {
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.prev-btn {
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.next-btn {
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.play-btn {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.center-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e8e8e8 0%, #c8c8c8 100%);
    border: none;
    cursor: pointer;
    box-shadow: 
        inset 0 2px 5px rgba(255,255,255,0.5),
        inset 0 -2px 5px rgba(0,0,0,0.1);
    transition: all 0.1s ease;
}

.center-button:hover {
    background: linear-gradient(145deg, #f0f0f0 0%, #d0d0d0 100%);
}

.center-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* Headphone Jack */
.headphone-jack {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 6px;
    background: #333;
    border-radius: 3px;
}

/* Earbuds */
.earbuds-container {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.earbud-wire {
    width: 2px;
    height: 60px;
    background: #ddd;
    margin: 0 auto;
    animation: wire-sway 3s ease-in-out infinite;
}

@keyframes wire-sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.earbud {
    width: 14px;
    height: 14px;
    background: linear-gradient(145deg, #fff 0%, #ddd 100%);
    border-radius: 50%;
    position: absolute;
    bottom: -20px;
}

.earbud.left {
    left: -20px;
    animation: earbud-swing 2.5s ease-in-out infinite;
}

.earbud.right {
    right: -20px;
    animation: earbud-swing 2.5s ease-in-out infinite 0.3s;
}

@keyframes earbud-swing {
    0%, 100% { transform: rotate(-5deg) translateY(0); }
    50% { transform: rotate(5deg) translateY(3px); }
}

/* Low Battery Warning */
.low-battery-warning {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 38, 38, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    animation: pulse 1s ease infinite;
    z-index: 100;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Instructions */
.instructions {
    color: #aaa;
    text-align: center;
    max-width: 250px;
}

.instructions h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: #fff;
}

.tagline {
    font-size: 14px;
    font-style: italic;
    margin-bottom: 15px;
    opacity: 0.7;
}

.tips {
    font-size: 12px;
    opacity: 0.6;
}

.tips p {
    margin-bottom: 4px;
}

/* Footer */
.footer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 12px;
}

.footer-divider {
    opacity: 0.3;
}

.remix-link {
    color: #4a8cf7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.remix-link:hover {
    color: #6aacff;
}

/* Responsive */
@media (max-width: 480px) {
    .ipod-device {
        width: 180px;
        height: 310px;
    }
    
    .screen-bezel {
        width: 150px;
        height: 112px;
    }
    
    .click-wheel {
        width: 120px;
        height: 120px;
    }
    
    .center-button {
        width: 44px;
        height: 44px;
    }
    
    .timestamp-2005 {
        top: -25px;
        right: 0;
    }
    
    .earbuds-container {
        bottom: -80px;
    }
    
    .earbud-wire {
        height: 50px;
    }
}

/* Dark mode for black/u2 iPod text */
.ipod-black .header-title,
.ipod-u2 .header-title,
.ipod-black .menu-item,
.ipod-u2 .menu-item,
.ipod-black .wheel-button,
.ipod-u2 .wheel-button {
    color: #fff;
}