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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #0f0f23);
    color: #ffffff;
    min-height: 100vh;
}

#app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #0066cc, #4da6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: #cccccc;
    font-size: 1.1rem;
}

#main-display {
    position: relative;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #000;
}

#canvas {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
}

#scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.05) 2px,
        rgba(0, 0, 0, 0.05) 4px
    );
    pointer-events: none;
}

#osd {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

#controls {
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

#playback-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

#playback-controls button {
    background: linear-gradient(135deg, #3a3a4e, #2a2a3e);
    border: 2px solid #0066cc;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 102, 204, 0.3);
}

#playback-controls button:hover {
    background: linear-gradient(135deg, #4a4a5e, #3a3a4e);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.5);
    transform: translateY(-2px);
}

#playback-controls button:active {
    transform: translateY(0);
}

#progress-container {
    margin-bottom: 25px;
}

#progress-bar {
    position: relative;
    height: 8px;
    background: #333;
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066cc, #4da6ff);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
}

#progress-handle {
    position: absolute;
    top: -4px;
    left: 0%;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 2px solid #0066cc;
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#time-display {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #cccccc;
}

#settings-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: center;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-group label {
    font-weight: bold;
    color: #cccccc;
    min-width: 80px;
}

.setting-group select {
    background: #2a2a3e;
    border: 1px solid #0066cc;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
}

.setting-group button {
    background: linear-gradient(135deg, #0066cc, #4da6ff);
    border: none;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.setting-group button:hover {
    background: linear-gradient(135deg, #4da6ff, #0066cc);
    transform: translateY(-1px);
}

#stats-overlay {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.stats-panel {
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #0066cc;
    font-family: 'Courier New', monospace;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.stats-panel h3 {
    color: #4da6ff;
    margin-bottom: 15px;
    text-align: center;
}

.stat-item {
    margin-bottom: 8px;
    color: #cccccc;
}

.stat-item span {
    color: #ffffff;
    font-weight: bold;
}

#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.menu-content {
    text-align: center;
    max-width: 600px;
    width: 90%;
}

.menu-content h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    background: linear-gradient(45deg, #0066cc, #4da6ff, #0066cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-item {
    padding: 20px 30px;
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-item:hover,
.menu-item.selected {
    border-color: #0066cc;
    background: linear-gradient(135deg, #3a3a4e, #2a2a3e);
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.5);
    transform: translateY(-2px);
}

.menu-item.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(77, 166, 255, 0.1), transparent);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #888;
    border-top: 1px solid #333;
}

footer a {
    color: #4da6ff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    #app {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    #playback-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    #playback-controls button {
        padding: 10px 15px;
        font-size: 1rem;
    }
    
    #settings-panel {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .setting-group {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .menu-content h2 {
        font-size: 2rem;
    }
    
    .menu-item {
        padding: 15px 20px;
        font-size: 1.1rem;
    }
    
    #stats-overlay {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
    }
    
    .stats-panel {
        padding: 15px;
    }
}

/* Loading animation for authentic Blu-ray feel */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* Anti-aliasing for better text rendering */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}