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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

body {
    font-family: 'Cairo', sans-serif;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    body::before {
        background: rgba(0, 0, 0, 0.1);
    }
    
    .container {
        padding: 15px;
    }
}

.container {
    width: 100%;
    max-width: 320px;
    position: relative;
    z-index: 1;
    padding: 20px;
    max-height: 100vh;
    overflow-y: auto;
}

.player-card {
    background: rgba(20, 15, 10, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 25px 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 180, 120, 0.1);
}

.logo {
    text-align: center;
    margin-bottom: 15px;
}

.logo h1 {
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffb347, #ffcc80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    font-size: 0.75rem;
    color: rgba(255, 220, 180, 0.5);
    letter-spacing: 2px;
}

.status {
    text-align: center;
    margin-bottom: 15px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 179, 71, 0.1);
    border-radius: 15px;
    color: #ffcc80;
    font-size: 0.75rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #ffb347;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.status-dot.offline {
    background: #666;
    animation: none;
}

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

.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb347, #ff8c42);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(255, 140, 66, 0.4);
}

.play-btn:hover {
    transform: scale(1.05);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.play-btn .pause-icon {
    display: none;
}

.play-btn.playing .play-icon {
    display: none;
}

.play-btn.playing .pause-icon {
    display: block;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
}

.volume-icon {
    width: 18px;
    height: 18px;
    fill: rgba(255, 220, 180, 0.5);
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: fill 0.2s ease;
}

.volume-icon:hover {
    fill: rgba(255, 220, 180, 0.8);
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #ffb347;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #ffb347;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Loading state */
.play-btn.loading {
    animation: pulse 1s infinite;
}

.play-btn.loading .play-icon {
    display: block !important;
}

.play-btn.loading .pause-icon {
    display: none !important;
}

/* Mobile improvements */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .player-card {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

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

    .play-btn svg {
        width: 28px;
        height: 28px;
    }

    .volume-slider {
        height: 6px;
    }

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

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

/* Extra small phones (< 400px) */
@media (max-width: 400px) {
    .container {
        padding: 10px;
        max-width: 95vw;
    }

    .player-card {
        padding: 20px 15px;
        border-radius: 16px;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .logo span {
        font-size: 0.65rem;
    }

    .status-indicator {
        font-size: 0.7rem;
        padding: 4px 10px;
        gap: 4px;
    }

    .status-dot {
        width: 5px;
        height: 5px;
    }

    .controls {
        gap: 12px;
        margin-bottom: 12px;
    }

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

    .play-btn svg {
        width: 26px;
        height: 26px;
    }

    .volume-control {
        gap: 8px;
    }

    .volume-icon {
        width: 16px;
        height: 16px;
        padding: 2px;
    }

    .volume-slider {
        height: 5px;
    }

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

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