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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    margin-bottom: 40px;
    opacity: 0.9;
    font-size: 1.1em;
}

.format-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.format-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.format-card:hover {
    transform: translateY(-5px);
}

.format-card h3 {
    margin-bottom: 15px;
    color: #64b5f6;
}

.format-card p {
    margin-bottom: 8px;
    font-size: 0.9em;
    opacity: 0.9;
}

.bitrate {
    margin-top: 10px;
    font-weight: bold;
    color: #ffd54f;
}

.format-status {
    margin-top: 10px;
    font-weight: 600;
    font-size: 0.9em;
}

.player-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.ab-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    height: 50px;
}

.format-btn {
    width: 100px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
}

.format-btn:not(.active):disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
}

.format-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.08);
}

.format-btn.active {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.4);
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.format-btn.active:hover {
    background: linear-gradient(135deg, #90caf9, #64b5f6);
}

.switch-indicator {
    position: absolute;
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    border-radius: 10px;
    top: 0;
    left: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.4);
    z-index: 1;
    pointer-events: none;
}

audio {
    width: 100%;
    height: 40px;
    margin-bottom: 20px;
    outline: none;
}


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

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#volume-btn {
    background: transparent;
}

#volume-btn:hover {
    background: transparent;
}

.progress-container {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #64b5f6;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    opacity: 0.9;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 500;
    user-select: none;
    -webkit-user-select: none;
}

.volume-slider {
    width: 60px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    border-radius: 3px;
    cursor: pointer;
}

.volume-slider:hover {
    opacity: 1;
}

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

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #64b5f6;
    cursor: pointer;
    border-radius: 50%;
}

.current-format {
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    color: #ffd54f;
    user-select: none;
    -webkit-user-select: none;
}

.comparison-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
}

.comparison-info h3 {
    margin-bottom: 20px;
    text-align: center;
    color: #64b5f6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature strong {
    color: #ffd54f;
    display: block;
    margin-bottom: 10px;
}

.feature ul {
    list-style: none;
    padding-left: 0;
}

.feature li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.feature li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #64b5f6;
}

/* Error message animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .format-info,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-wrap: wrap;
    }

    .progress-container {
        order: -1;
        width: 100%;
        margin-bottom: 10px;
    }
}