/* ========================================
   DOODLE BEATS - Compact Card Style
   Similar to reference image aesthetic
   ======================================== */

/* Font Face - Comic Sans MS for all devices */
@font-face {
    font-family: 'Comic Sans MS';
    src: url('assets/comic-sans-ms/ComicSansMS3.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Comic Sans MS';
    src: url('assets/comic-sans-ms/design.graffiti.comicsansmsgras.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* CSS Variables for theming */
:root {
    --primary-bg: #f5f0e8;
    --card-bg: #d4c4a8;
    --card-border: #8b7355;
    --text-dark: #2c2416;
    --text-light: #5a4d3a;
    --accent: #ff6b6b;
    --accent-hover: #ff5252;
    --progress-bg: #9d8b73;
    --progress-fill: #2c2416;
    --shadow: rgba(0, 0, 0, 0.2);
}

/* Loader Styles */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.loader-cat {
    width: 100px;
    height: 100px;
    animation: bounce 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.loader-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue';
}

.loader-bar-container {
    width: 100%;
    height: 40px;
    background-image: url('assets/progress-bar.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--text-dark);
    opacity: 0.3;
    transition: width 0.3s ease;
    border-radius: 0;
}

.loader-percentage {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue';
}

.loader-text {
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue';
    background: var(--primary-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Decorative Background Elements */
.doodle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
}

.star, .butterfly, .music-note {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    color: var(--text-light);
}

.music-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.star-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.cloud-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.heart-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.sun-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.heart-title-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.star-1 { top: 5%; left: 10%; animation-delay: 0s; }
.star-2 { top: 15%; right: 15%; animation-delay: 1s; }
.star-3 { bottom: 20%; left: 20%; animation-delay: 2s; }
.butterfly-1 { top: 40%; right: 10%; animation-delay: 0.5s; }
.butterfly-2 { bottom: 40%; left: 15%; animation-delay: 1.5s; }
.note-1 { top: 70%; right: 25%; animation-delay: 0.3s; }
.note-2 { top: 25%; left: 5%; animation-delay: 1.2s; }
.note-3 { bottom: 10%; right: 30%; animation-delay: 0.8s; }

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

/* Container */
.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

.app-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.doodle-sun {
    display: inline-block;
    color: #ffa500;
    animation: spin 10s linear infinite;
}

.doodle-heart {
    color: var(--accent);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Player Container */
.player-container {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 30px;
    align-items: start;
}

/* Player Card - Compact Design */
.player-card {
    background-image: url('assets/player-card.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    border-radius: 0;
    padding: 35px 40px 55px 40px;
    position: relative;
    box-shadow: none;
    box-sizing: border-box;
    aspect-ratio: 849 / 575;
    max-width: 500px;
    width: 100%;
}

.player-card::before {
    display: none;
}

/* Top Section - Album Art + Track Info */
.card-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    position: relative;
}

.album-art-small {
    flex-shrink: 0;
}

.small-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: none;
    object-fit: cover;
    background: var(--progress-bg);
}

.track-info-compact {
    flex: 1;
    min-width: 0;
    padding-right: 40px;
}

.track-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 2px;
    color: var(--text-dark);
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.2;
}

.track-artist {
    font-size: 1rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doodle-decorations {
    position: absolute;
    top: -10px;
    right: -15px;
    display: flex;
    gap: 8px;
}

.doodle-icon {
    font-size: 1.5rem;
    animation: wiggle 3s ease-in-out infinite;
}

.doodle-icon:nth-child(2) {
    animation-delay: 0.5s;
}

.doodle-cat-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    position: relative;
    right: -10px;
}

.doodle-circle-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.time {
    font-size: 0.85rem;
    color: var(--text-dark);
    min-width: 45px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background-image: url('assets/progress-bar.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    border-radius: 0;
    position: relative;
    cursor: pointer;
}

.progress-bar:active,
.progress-bar:focus {
    outline: none;
}

.progress-bar:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.progress-fill {
    height: 100%;
    background: transparent;
    border-radius: 0;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-knob {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background-image: url('assets/progress-bar-thumb-knob-ball.png');
    background-size: cover;
    background-position: center;
    border: none;
    border-radius: 0;
    cursor: grab;
}

.progress-knob:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.2);
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-bottom: 15px;
}

.control-btn {
    background: transparent;
    border: none;
    border-radius: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    position: relative;
}

.play-btn .icon {
    fill: transparent;
}

.play-btn.playing {
    background: transparent;
}

.play-btn.playing .icon {
    fill: transparent;
}

.play-btn.click-active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    border-radius: 0;
    pointer-events: none;
}

.control-btn:hover {
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
    outline: none;
}

.control-btn:focus {
    outline: none;
}

.control-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.icon {
    font-size: 24px;
    color: var(--text-dark);
}

.play-btn .icon {
    font-size: 28px;
    color: var(--card-bg);
}

.btn-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.play-btn .btn-icon {
    width: 40px;
    height: 40px;
}

.volume-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.hidden {
    display: none !important;
}

/* Volume Container */
.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding: 8px 0;
}

.volume-btn {
    background: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.volume-btn:hover {
    transform: scale(1.1);
}

.volume-btn:active,
.volume-btn:focus {
    outline: none;
}

.volume-btn:focus-visible {
    outline: 2px solid var(--accent);
}

.volume-btn .icon {
    font-size: 20px;
    color: var(--text-dark);
}

.volume-bar-container {
    flex: 1;
}

.volume-bar {
    position: relative;
}

.volume-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url('assets/progress-bar.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    background-image: url('assets/progress-bar-thumb-knob-ball.png');
    background-size: cover;
    background-position: center;
    border: none;
    border-radius: 0;
    cursor: pointer;
    outline: none;
}

.volume-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    background-image: url('assets/progress-bar-thumb-knob-ball.png');
    background-size: cover;
    background-position: center;
    border: none;
    border-radius: 0;
    cursor: pointer;
    outline: none;
}

.volume-slider:active,
.volume-slider:focus {
    outline: none;
}

.volume-slider:focus-visible {
    outline: 2px dashed var(--accent);
    outline-offset: 3px;
}

/* Bottom Controls */
.bottom-controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-top: 5px;
    border-top: 2px dashed var(--card-border);
}

.icon-btn {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 6px;
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.icon-btn:active {
    outline: none;
}

.icon-btn:focus {
    outline: none;
}

.icon-btn:focus-visible {
    outline: 2px solid var(--accent);
}

.icon-btn.active {
    background: var(--text-dark);
}

.icon-btn.active .icon-small {
    color: var(--card-bg);
}

.icon-small {
    font-size: 20px;
    color: var(--text-dark);
}

.repeat-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Playlist Container */
.playlist-container {
    background-image: url('assets/playlist-container.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    border-radius: 0;
    padding: 40px 35px;
    box-shadow: none;
    aspect-ratio: 627 / 847;
    max-width: 450px;
    width: 100%;
    height: fit-content;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.playlist-header h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
}

.playlist-count {
    font-size: 0.9rem;
    color: var(--text-light);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 8px 50px 8px 15px;
    border: none;
    border-radius: 0;
    font-size: 0.9rem;
    font-family: inherit;
    background-image: url('assets/searchbar.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: var(--text-dark);
    transition: all 0.3s ease;
    aspect-ratio: 1421 / 188;
    width: 100%;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-input:active,
.search-input:focus {
    outline: none;
}

.search-input:focus-visible {
    outline: none;
}

.search-icon {
    display: none;
}

/* Playlist */
.playlist {
    list-style: none;
    overflow-y: auto;
    padding-right: 5px;
    flex: 1;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.playlist::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 6px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.playlist-item:hover {
    background: var(--progress-bg);
    border-color: var(--card-border);
    transform: translateX(3px);
}

.playlist-item:active,
.playlist-item:focus {
    outline: none;
}

.playlist-item:focus-visible {
    outline: 2px solid var(--accent);
}

.playlist-item.active {
    background: var(--text-dark);
    border-color: var(--text-dark);
    color: var(--card-bg);
}

.playlist-item.active .track-index,
.playlist-item.active .playlist-track-title,
.playlist-item.active .playlist-track-artist {
    color: var(--card-bg);
}

.playlist-item.active::after {
    content: '';
    position: absolute;
    right: 10px;
    width: 20px;
    height: 20px;
    background-image: url('assets/music.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.track-index {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-light);
    min-width: 25px;
}

.playlist-thumb {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    border: none;
    object-fit: cover;
}

.playlist-track-info {
    flex: 1;
    min-width: 0;
    padding-right: 30px;
}

.playlist-track-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-track-artist {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
}

.footer-text {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--text-dark);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--accent);
    transform: scale(1.2);
}

/* Help Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    border: 4px solid var(--card-border);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 12px 12px 0 var(--shadow);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    border: 2px solid var(--card-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.shortcuts-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 15px;
}

.shortcuts-list dt {
    background: var(--text-dark);
    color: var(--card-bg);
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    min-width: 50px;
}

.shortcuts-list dd {
    display: flex;
    align-items: center;
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .player-container {
        grid-template-columns: 1fr;
    }

    .playlist-container {
        aspect-ratio: 627 / 847;
        max-width: 420px;
    }
}

@media (max-width: 768px) {
    body {
        display: block;
        padding: 0;
        width: 100vw;
    }

    .container {
        padding: 15px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    header {
        margin-bottom: 15px;
    }

    .app-title {
        font-size: 1.5rem;
    }

    .player-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .player-card {
        padding: 30px 35px 50px 35px;
        box-shadow: none;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        aspect-ratio: 849 / 575;
        background-size: 100% 100%;
    }

    .card-top {
        justify-content: center;
        margin-bottom: 18px;
    }

    .small-thumb {
        width: 90px;
        height: 90px;
    }

    .track-title {
        font-size: 1.2rem;
    }

    .track-artist {
        font-size: 0.95rem;
    }

    .doodle-decorations {
        top: -5px;
        right: -10px;
    }

    .progress-container {
        margin-bottom: 18px;
    }

    .time {
        font-size: 0.8rem;
        min-width: 40px;
    }

    .controls {
        gap: 20px;
        margin-bottom: 18px;
    }

    .control-btn {
        width: 55px;
        height: 55px;
    }

    .play-btn {
        width: 70px;
        height: 70px;
    }

    .icon {
        font-size: 26px;
    }

    .play-btn .icon {
        font-size: 32px;
    }

    .volume-container {
        display: none;
    }

    .volume-btn .icon {
        font-size: 22px;
    }

    .volume-slider {
        height: 10px;
    }

    .volume-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }

    .volume-slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }

    .bottom-controls {
        padding-top: 10px;
    }

    .icon-btn {
        padding: 10px;
    }

    .icon-small {
        font-size: 22px;
    }

    /* Playlist on mobile */
    .playlist-container {
        aspect-ratio: 627 / 847;
        padding: 35px 30px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .playlist-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .playlist-header h3 {
        font-size: 1.2rem;
    }

    .search-container {
        width: 100%;
    }

    .search-input {
        width: 100%;
        padding: 8px 35px 8px 12px;
    }

    .playlist {
        max-height: 400px;
    }

    .playlist-item {
        padding: 10px;
        margin-bottom: 8px;
    }

    .track-index {
        font-size: 1rem;
        min-width: 28px;
    }

    .playlist-thumb {
        width: 45px;
        height: 45px;
    }

    .playlist-track-title {
        font-size: 1rem;
    }

    .playlist-track-artist {
        font-size: 0.85rem;
    }

    footer {
        margin-top: 15px;
        padding: 10px;
    }

    .footer-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
        box-sizing: border-box;
    }

    .app-title {
        font-size: 1.3rem;
    }

    .player-card {
        padding: 25px 30px 45px 30px;
        border-radius: 0;
        box-sizing: border-box;
        width: 100%;
        aspect-ratio: 849 / 575;
        background-size: 100% 100%;
    }

    .card-top {
        flex-direction: row;
        gap: 12px;
        align-items: flex-start;
    }

    .small-thumb {
        width: 80px;
        height: 80px;
    }

    .track-title {
        font-size: 1.1rem;
        text-align: left;
    }

    .track-artist {
        font-size: 0.9rem;
        text-align: left;
    }

    .doodle-decorations {
        top: -8px;
        right: -10px;
        gap: 5px;
    }

    .doodle-icon {
        font-size: 1.3rem;
    }

    .progress-bar {
        height: 12px;
    }

    .progress-knob {
        width: 20px;
        height: 20px;
    }

    .controls {
        gap: 18px;
        margin-bottom: 15px;
    }

    .control-btn {
        width: 50px;
        height: 50px;
        border-width: 2px;
    }

    .play-btn {
        width: 65px;
        height: 65px;
    }

    .icon {
        font-size: 24px;
    }

    .play-btn .icon {
        font-size: 30px;
    }

    .volume-container {
        gap: 10px;
        margin-bottom: 15px;
    }

    .volume-btn .icon {
        font-size: 20px;
    }

    .bottom-controls {
        padding-top: 8px;
        gap: 5px;
    }

    .icon-btn {
        padding: 8px;
    }

    .icon-small {
        font-size: 20px;
    }

    .playlist-container {
        padding: 30px 25px;
        aspect-ratio: 627 / 847;
        box-sizing: border-box;
        width: 100%;
    }

    .playlist-header h3 {
        font-size: 1.1rem;
    }

    .search-input {
        font-size: 0.85rem;
        padding: 7px 30px 7px 10px;
    }

    .playlist {
        max-height: 350px;
    }

    .playlist-item {
        padding: 8px;
    }

    .track-index {
        font-size: 0.9rem;
        min-width: 25px;
    }

    .playlist-thumb {
        width: 42px;
        height: 42px;
    }

    .playlist-track-title {
        font-size: 0.95rem;
    }

    .playlist-track-artist {
        font-size: 0.8rem;
    }

    .modal-content {
        padding: 20px;
        border-width: 3px;
    }

    .shortcuts-list {
        gap: 8px 12px;
    }

    .shortcuts-list dt {
        font-size: 0.85rem;
        padding: 3px 8px;
    }

    .shortcuts-list dd {
        font-size: 0.85rem;
    }
}

@media (max-width: 390px) {
    .container {
        padding: 10px;
    }

    .player-card {
        padding: 20px 25px 40px 25px;
        box-sizing: border-box;
        aspect-ratio: 849 / 575;
        background-size: 100% 100%;
    }

    .playlist-container {
        box-sizing: border-box;
        aspect-ratio: 627 / 847;
        padding: 25px 20px;
    }

    .small-thumb {
        width: 70px;
        height: 70px;
    }

    .track-title {
        font-size: 1rem;
    }

    .track-artist {
        font-size: 0.85rem;
    }

    .control-btn {
        width: 45px;
        height: 45px;
    }

    .play-btn {
        width: 60px;
        height: 60px;
    }

    .controls {
        gap: 15px;
    }
}

/* Accessibility */
*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Print styles */
@media print {
    .doodle-bg,
    .controls,
    .bottom-controls,
    .volume-container {
        display: none;
    }
}
