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

body {
    background: #0a0c12;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'SF Mono', 'Fira Code', monospace;
    overflow: hidden;
}

.canvas-container {
    border-radius: 24px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background: #000;
    line-height: 0;
}

canvas {
    display: block;
    border-radius: 20px;
    cursor: crosshair;
    width: 100%;
    height: auto;
    transition: width 0.2s ease, height 0.2s ease;
}

video {
    display: none;
}

#info-panel {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(15, 20, 30, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 8px 18px;
    font-family: monospace;
    font-size: 13px;
    color: #e3e9ff;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    z-index: 100;
    border: 1px solid rgba(110, 231, 255, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
    font-weight: 500;
}

#info-panel span {
    color: #6ee7ff;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
}

@media (max-width: 700px) {
    #info-panel {
        font-size: 9px;
        bottom: 8px;
        left: 8px;
        right: 8px;
        padding: 6px 12px;
    }
}

#toolbar {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    padding: 12px 24px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: monospace;
}

#fileOptions, #videoOptions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

#toolbar button {
    background: #1e2a3a;
    border: none;
    color: white;
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#toolbar button:hover {
    background: #2c3e4e;
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#toolbar button:active {
    transform: scale(0.98);
}

#toolbar button:focus-visible,
#urlInput:focus-visible {
    outline: 2px solid #6ee7ff;
    outline-offset: 2px;
}

#urlInput {
    background: rgba(20, 25, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 6px 14px;
    color: white;
    font-family: monospace;
    font-size: 12px;
    outline: none;
    transition: 0.2s;
    width: 450px;
}

#urlInput:focus {
    border-color: #6ee7ff;
    box-shadow: 0 0 0 2px rgba(110, 231, 255, 0.2);
}

#urlInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

#volume {
    width: 100px;
    background: #1e2a3a;
    height: 4px;
    border-radius: 5px;
}

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

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

#playToggle.paused {
    background: #3a5a6e;
    box-shadow: 0 0 4px #6ee7ff;
}

#MuteToggle.muted {
    background: #5a3a3a;
}

.whiteText {
    color: white;
}

@media (max-width: 800px) {
    #toolbar {
        flex-direction: column;
        align-items: stretch;
        top: 10px;
        left: 10px;
        right: 10px;
        border-radius: 24px;
        padding: 12px;
        gap: 12px;
    }
    
    #fileOptions, #videoOptions {
        justify-content: center;
    }
    
    #urlInput {
        width: 100%;
    }
    
    #toolbar button {
        padding: 6px 12px;
        font-size: 12px;
        flex: 1 1 auto;
        min-width: 70px;
        text-align: center;
    }
    
    #volume {
        width: 100%;
        max-width: 120px;
    }
}