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

body {
    font-family: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #14141a 0%, #1a1a26 25%, #242436 50%, #1a1a26 75%, #14141a 100%);
    background-attachment: fixed;
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(53, 200, 255, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(170, 51, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

header {
    text-align: center;
    margin-bottom: 32px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    letter-spacing: -0.8px;
    text-shadow: none;
}

header p {
    font-size: 1.1rem;
    color: #a0a0a0;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.input-section {
    background: rgba(255, 255, 255, 0.03);
    padding: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 48px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
}

#urlInput {
    flex: 1;
    min-width: 300px;
    padding: 20px 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 300;
    outline: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    box-shadow: none;
}

#urlInput:focus {
    border-color: #35C8FF;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(53, 200, 255, 0.3);
    transform: none;
}

#urlInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

button {
    padding: 18px 32px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    letter-spacing: 0.3px;
}

#playBtn {
    background: linear-gradient(135deg, #35C8FF 0%, #1CB5E0 100%);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 12px rgba(53, 200, 255, 0.3);
}

#playBtn:hover {
    background: linear-gradient(135deg, #1CB5E0 0%, #0EA5E9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(53, 200, 255, 0.5);
}

#clearBtn {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    box-shadow: none;
}

#clearBtn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.15);
}

.player-section {
    margin-bottom: 27px;
}

/* Player with Metrics Layout */
.player-with-metrics {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    justify-content: space-between;
}

.video-container {
    flex: 1;
    min-width: 0;
    height: 590px;
    position: relative;
    width: 100%;
    max-width: 1000px;
    background: #000000;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#videoPlayer {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

/* Unique Custom Controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 20px 16px 12px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.video-container:hover .video-controls,
.video-controls.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Unique Progress Bar */
.progress-container {
    margin-bottom: 12px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 10px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.progress-container:hover .progress-bar {
    height: 7px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.progress-filled {
    height: 100%;
    background: linear-gradient(90deg, #35C8FF 0%, #AA33FF 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
    overflow: hidden;
}

.progress-filled::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #35C8FF;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s ease;
    left: 0%;
    box-shadow: 0 0 0 3px rgba(53, 200, 255, 0.3);
    border: 2px solid #ffffff;
}

.progress-container:hover .progress-handle {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

/* Controls Row */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Simple Control Buttons */
.control-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.05);
}

.control-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.play-pause-btn {
    padding: 14px;
}

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

/* Simple Volume Controls */
.volume-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.volume-slider {
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.volume-container:hover .volume-slider {
    width: 70px;
}

.volume-bar {
    width: 70px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.volume-filled {
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    width: 100%;
    transition: background 0.2s ease;
}

.volume-bar:hover .volume-filled {
    background: white;
}

.volume-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    right: -7px;
    transition: all 0.2s ease;
}

.volume-bar:hover .volume-handle {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Simple Time Display */
.time-display {
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    margin-left: 12px;
    font-weight: 500;
}

.time-separator {
    margin: 0 4px;
    color: rgba(255, 255, 255, 0.6);
}

/* Video Selectors in Player */
.video-selectors {
    display: flex;
    gap: 10px;
    margin-right: 12px;
}

.video-select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    outline: none;
    cursor: pointer;
    min-width: 90px;
    transition: all 0.2s ease;
    font-weight: 400;
    backdrop-filter: blur(6px);
    position: relative;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%2335C8FF" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
    padding-right: 28px;
}

.video-select:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #35C8FF;
    color: #35C8FF;
}

.video-select:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: #35C8FF;
    color: #35C8FF;
    box-shadow: 0 0 0 2px rgba(53, 200, 255, 0.3);
}

/* Enhanced dropdown styling */
.video-select:active,
.video-select[size]:focus,
.video-select[multiple]:focus {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Custom scrollbar for dropdown */
.video-select::-webkit-scrollbar {
    width: 8px;
}

.video-select::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.video-select::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.video-select::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.video-select option {
    background: rgba(20, 20, 20, 0.95);
    color: rgba(255, 255, 255, 0.95);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 2px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

/* Subtle highlight effect */
.video-select option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.video-select option:hover::before {
    left: 100%;
}

.video-select option:hover {
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.video-select option:checked,
.video-select option:selected {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    box-shadow: 
        0 0 0 2px rgba(255, 255, 255, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Animation for dropdown opening */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-select:focus option {
    animation: dropdownFadeIn 0.2s ease-out;
}

/* Special styling for Auto/Default options */
.video-select option[value="auto"] {
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.2) 0%, rgba(50, 150, 255, 0.1) 100%);
    border-color: rgba(100, 200, 255, 0.3);
    font-weight: 600;
}

.video-select option[value="auto"]:hover {
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.3) 0%, rgba(50, 150, 255, 0.2) 100%);
    border-color: rgba(100, 200, 255, 0.4);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(100, 200, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Unique Play Overlay */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.play-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.play-overlay-btn {
    position: relative;
    background: linear-gradient(135deg, #35C8FF 0%, #AA33FF 100%);
    border: none;
    color: #ffffff;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
    box-shadow: 0 4px 20px rgba(53, 200, 255, 0.4);
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        box-shadow: 
            0 0 0 0 rgba(53, 200, 255, 0.4),
            0 4px 20px rgba(53, 200, 255, 0.4);
    }
    50% {
        box-shadow: 
            0 0 0 15px rgba(53, 200, 255, 0),
            0 4px 20px rgba(53, 200, 255, 0.4);
    }
    100% {
        box-shadow: 
            0 0 0 0 rgba(53, 200, 255, 0),
            0 4px 20px rgba(53, 200, 255, 0.4);
    }
}

.play-overlay-btn:hover {
    background: linear-gradient(135deg, #1CB5E0 0%, #8B33CC 100%);
    transform: scale(1.1);
    animation: none;
    box-shadow: 0 8px 30px rgba(53, 200, 255, 0.6);
}

.play-overlay-btn::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-overlay-btn:hover::before {
    opacity: 1;
}

.play-overlay-btn svg {
    width: 36px;
    height: 36px;
    fill: currentColor;
    margin-left: 6px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Metrics Panel - Side Layout */
.metrics-panel {
    flex-shrink: 0;
    width: 320px;
    height: 590px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 20px;
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
    margin-left: auto;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.metrics-header {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(53, 200, 255, 0.2);
    position: relative;
    flex-shrink: 0;
}

.metrics-header h4 {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.2px;
    text-transform: uppercase;
    opacity: 0.9;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    min-height: 32px;
}

.metric-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #35C8FF;
    transform: translateY(-0.5px);
    box-shadow: 
        0 0 0 1px #35C8FF,
        0 2px 8px rgba(53, 200, 255, 0.15);
}

.metric-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    flex: 1;
}

.metric-value {
    font-size: 0.7rem;
    color: #35C8FF;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    text-align: right;
    letter-spacing: 0.2px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Specific metric styling */
.metric-item[data-metric="droppedFrames"] {
    border-left: 2px solid #AA33FF;
    background: rgba(170, 51, 255, 0.08);
}

.metric-item[data-metric="droppedFrames"] .metric-value {
    color: #AA33FF;
    font-weight: 800;
    font-size: 0.75rem;
}

.metric-item[data-metric="droppedFrames"]:hover {
    border-color: #AA33FF;
    box-shadow: 
        0 0 0 1px #AA33FF,
        0 2px 8px rgba(170, 51, 255, 0.2);
}

.metric-item[data-metric="currentQuality"] {
    border-left: 2px solid #35C8FF;
}

.metric-item[data-metric="currentBitrate"] .metric-value {
    color: #4ade80;
}

.metric-item[data-metric="latencyEstimate"] .metric-value {
    color: #fbbf24;
}

/* Create sections for better organization */
.metrics-section {
    margin-bottom: 14px;
    flex: 1;
}

.metrics-section-title {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
    padding-left: 2px;
}


.info-section {
    background: rgba(255, 255, 255, 0.02);
    padding: 32px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.status {
    padding: 20px 24px;
    border-radius: 4px;
    margin-bottom: 32px;
    text-align: center;
    font-weight: 400;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    backdrop-filter: blur(6px);
    letter-spacing: 0.3px;
}

.status.loading {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.2);
}

.status.error {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
}

.status.playing {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}

.sample-urls h3 {
    margin-bottom: 24px;
    color: #ffffff;
    font-size: 1.0rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    opacity: 0.8;
}

.url-samples {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.sample-btn {
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 400;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
}

.sample-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #35C8FF;
    color: #35C8FF;
    transform: translateY(-1px);
}

/* Copyright Footer */
.copyright-footer {
    text-align: center;
    padding: 32px 0;
    margin-top: 48px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.copyright-footer p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-weight: 400;
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    header {
        margin-bottom: 24px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .input-section {
        flex-direction: column;
        padding: 16px;
    }
    
    #urlInput {
        min-width: 100%;
    }
    
    .url-samples {
        flex-direction: column;
    }
    
    .info-section {
        padding: 16px;
    }
    
    .copyright-footer {
        margin-top: 24px;
        padding: 16px 0;
    }
    
    /* Mobile: Stack metrics below video */
    .player-with-metrics {
        flex-direction: column;
    }
    
    .metrics-panel {
        width: 100%;
        order: 2;
    }
}