/* Import child-friendly font */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Fredoka', cursive;
    background: linear-gradient(135deg, #FF6B9D 0%, #C44569 25%, #F093FB 50%, #FDCB6E 75%, #6C5CE7 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.player-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.player-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,107,157,0.1) 0%, transparent 70%);
    animation: sparkle 4s ease-in-out infinite alternate;
}

@keyframes sparkle {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(180deg) scale(1.1); }
}

.header-section {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #FF6B9D;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px) rotate(-1deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes gentleBreath {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.01) rotate(0.5deg); }
}

.main-title i {
    color: #FDCB6E;
    animation: spin 3s linear infinite;
}

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

.subtitle {
    font-size: 1.2rem;
    color: #6C5CE7;
    margin: 10px 0 0 0;
    font-weight: 500;
}

.controls-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    position: relative;
    z-index: 2;
}

.control-btn {
    background: linear-gradient(45deg, #FF6B9D, #FDCB6E);
    border: none;
    border-radius: 20px;
    padding: 15px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    font-family: 'Fredoka', cursive;
    min-width: 140px;
    justify-content: center;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
    background: linear-gradient(45deg, #FF4757, #FFA726);
}

.control-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(255, 107, 157, 0.3);
}

.control-btn i {
    font-size: 1.4rem;
}

.play-pause-btn {
    background: linear-gradient(45deg, #4CAF50, #66BB6A) !important;
}

.play-pause-btn:hover {
    background: linear-gradient(45deg, #388E3C, #4CAF50) !important;
}


@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(-2deg); }
}

.filter-section {
    margin: 25px 0;
    position: relative;
    z-index: 2;
}

.search-container {
    margin-bottom: 15px;
    text-align: center;
    display: none;
}

.search-input {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    border: 2px solid rgba(255, 107, 157, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-family: 'Fredoka', cursive;
    color: #2D3436;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #FF6B9D;
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.3);
    transform: scale(1.02);
}

.search-input::placeholder {
    color: #6C5CE7;
    opacity: 0.7;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(108, 92, 231, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6C5CE7;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Fredoka', cursive;
    min-width: 80px;
}

.filter-btn:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: #6C5CE7;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(45deg, #FF6B9D, #FDCB6E);
    border-color: #FF6B9D;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.filter-btn.active:hover {
    background: linear-gradient(45deg, #FF4757, #FFA726);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.track-info {
    margin: 25px 0;
    position: relative;
    z-index: 2;
}

.track-display {
    background: rgba(108, 92, 231, 0.1);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(108, 92, 231, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
}

.track-icon {
    font-size: 2rem;
}

@keyframes pulse {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(1deg); }
    50% { transform: scale(1.1) rotate(0deg); }
    75% { transform: scale(1.05) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.track-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2D3436;
    line-height: 1.4;
    flex: 1;
}

.track-stats {
    margin-top: 10px;
    text-align: center;
}

.track-count {
    font-size: 0.9rem;
    color: #6C5CE7;
    font-weight: 500;
    background: rgba(108, 92, 231, 0.1);
    padding: 5px 12px;
    border-radius: 15px;
    display: inline-block;
}


/* Responsive design for mobile */

/* Tablet and larger mobile devices */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .player-container {
        padding: 20px;
        margin: 5px;
        border-radius: 20px;
        max-width: 100%;
    }

    .main-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .main-title i {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .controls-section {
        flex-direction: column;
        gap: 20px;
        margin: 25px 0;
    }

    .control-btn {
        padding: 16px 24px;
        font-size: 1.1rem;
        min-width: 160px;
        min-height: 50px;
        border-radius: 25px;
        box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
    }

    .control-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(255, 107, 157, 0.5);
    }

    .control-btn:active {
        transform: translateY(0px);
        box-shadow: 0 3px 15px rgba(255, 107, 157, 0.3);
    }

    .control-btn i {
        font-size: 1.3rem;
    }



    .track-info {
        margin: 25px 0;
    }

    .filter-section {
        margin: 20px 0;
    }

    .search-input {
        max-width: 250px;
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 12px 18px;
        font-size: 0.95rem;
        min-width: 90px;
    }

    .track-display {
        padding: 18px;
        border-radius: 12px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .track-icon {
        font-size: 1.8rem;
    }

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

}

/* Small mobile devices (phones) */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .player-container {
        padding: 15px;
        margin: 2px;
        border-radius: 15px;
    }

    .header-section {
        margin-bottom: 20px;
    }

    .main-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .main-title i {
        font-size: 1.2rem;
        margin: 0 8px;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .controls-section {
        gap: 15px;
        margin: 20px 0;
    }

    .control-btn {
        padding: 14px 20px;
        font-size: 1rem;
        min-width: 140px;
        min-height: 45px;
        border-radius: 22px;
    }

    .control-btn span {
        display: inline;
    }



    .track-info {
        margin: 20px 0;
    }

    .track-display {
        padding: 15px;
        border-radius: 10px;
    }

    .track-icon {
        font-size: 1.6rem;
    }

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

}

/* Extra small devices */
@media (max-width: 360px) {
    .player-container {
        padding: 12px;
    }

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

    .control-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-width: 120px;
        min-height: 40px;
    }

    .control-btn i {
        font-size: 1.1rem;
    }

    .track-display {
        padding: 12px;
    }

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

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 5px;
        min-height: auto;
        height: auto;
    }

    .player-container {
        margin: 2px auto;
        max-width: 95%;
    }

    .main-title {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .controls-section {
        flex-direction: row;
        gap: 15px;
        margin: 15px 0;
        justify-content: space-around;
    }

    .control-btn {
        min-width: 120px;
        padding: 10px 16px;
    }


    .track-info {
        margin: 15px 0;
    }

    .track-display {
        padding: 12px;
    }

}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .control-btn {
        min-height: 48px; /* Minimum touch target size */
    }

    .control-btn:hover {
        transform: none;
        background: linear-gradient(45deg, #FF6B9D, #FDCB6E);
    }

    .control-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .player-container {
        border: 3px solid #000;
        background: rgba(255, 255, 255, 0.98);
    }

    .control-btn {
        border: 2px solid #000;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .track-display {
        border: 2px solid #000;
        background: rgba(108, 92, 231, 0.15);
    }

    .filter-btn {
        background: #FFFFFF;
        border: 3px solid #000000;
        color: #000000;
        font-weight: 700;
    }

    .filter-btn:hover {
        background: #000000;
        color: #FFFFFF;
        border-color: #000000;
    }

    .filter-btn.active {
        background: #000000;
        border-color: #000000;
        color: #FFFFFF;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }

    .filter-btn.active:hover {
        background: #333333;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    }

    .play-pause-btn {
        background: #000000 !important;
        border: 3px solid #FFFFFF !important;
        color: #FFFFFF !important;
    }

    .play-pause-btn:hover {
        background: #333333 !important;
        border-color: #FFFFFF !important;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .main-title,
    .main-title i,
    .track-icon,
    .stars span {
        animation: none;
    }

    .player-container::before {
        animation: none;
    }
}

/* ----------------------------- */
/* Mobile app style overrides    */
/* No layout changes, colors only*/
/* ----------------------------- */

:root {
    --page-bg-start: #B8E6FF;
    --page-bg-end: #F7FBFF;
    --container-bg-top: #7B62E6;
    --container-bg-bottom: #201B3A;
    --container-bg: linear-gradient(180deg, var(--container-bg-top) 0%, var(--container-bg-bottom) 100%);
    --surface: #2A2E4B;
    --surface-elevated: #353A5E;
    --border: rgba(255, 255, 255, 0.08);
    --text-primary: #FFFFFF;
    --text-secondary: #B7C0D8;
    --accent: #FFC94A;
    --accent-contrast: #1F223D;
}

body {
    background: linear-gradient(180deg, var(--page-bg-start) 0%, var(--page-bg-end) 100%);
    background-size: cover;
}

.player-container {
    background: var(--container-bg);
    border: 1px solid var(--border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.player-container::before {
    background: none;
    animation: none;
    display: none;
}

.main-title {
    color: var(--text-primary);
    text-shadow: none;
}

.main-title i {
    color: var(--accent);
    animation: none;
}

.subtitle {
    color: var(--text-secondary);
}

.control-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.control-btn:hover {
    background: var(--surface-elevated);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.filter-btn:hover {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.track-display {
    background: var(--surface);
    border: 1px solid var(--border);
}

.track-icon {
    color: var(--accent);
}

.track-title {
    color: var(--text-primary);
}

.track-count {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
}

.search-input {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 201, 74, 0.2);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.9;
}
