:root {
    --primary: #4a90e2;
    --bg-color: #1e1e24;
    --panel-color: #2b2b36;
    --text-color: #f5f6fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    background-color: var(--panel-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
}

h1 {
    color: var(--primary);
    text-align: center;
    margin-top: 0;
}

h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #fff;
}

.hidden {
    display: none !important;
}

.error-text {
    color: #ff6b6b;
    text-align: center;
    margin-top: 10px;
}

input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #444;
    color: white;
    border-radius: 6px;
    margin-bottom: 15px;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

button:hover {
    background-color: #357abd;
}

button:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #444;
}

.form-group,
.options-group {
    background: rgba(0, 0, 0, 0.15);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* Grilles de sélection visuelle */
.visual-selectors {
    display: flex;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.visual-btn {
    flex: 1;
    cursor: pointer;
}

.visual-btn input {
    display: none;
}

.visual-btn .box {
    background: #3a3a48;
    border: 2px solid transparent;
    padding: 15px 5px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: bold;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 68px;
}

.visual-btn input:checked+.box {
    border-color: var(--primary);
    background: #2f4055;
}

/* Icônes 3D */
.preview-shape {
    width: 40px;
    height: 25px;
    background: var(--primary);
    margin-bottom: 8px;
    border-radius: 2px;
}

.h-left {
    transform: perspective(50px) rotateY(-20deg);
}

.h-right {
    transform: perspective(50px) rotateY(20deg);
}

.v-top {
    transform: perspective(50px) rotateX(20deg);
}

.v-bottom {
    transform: perspective(50px) rotateX(-20deg);
}

.none {
    transform: none;
}

/* Nouvelles Icônes Effets d'Écran */
.icon-lens {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    margin-bottom: 8px;
    box-shadow: inset 0 0 10px rgba(74, 144, 226, 0.6);
}

.icon-chroma {
    width: 25px;
    height: 30px;
    background: #fff;
    border-radius: 3px;
    margin-bottom: 8px;
    box-shadow: -4px 0 rgba(255, 0, 0, 0.9), 4px 0 rgba(0, 255, 255, 0.9);
}

.icon-crt-lines {
    width: 35px;
    height: 30px;
    background-color: var(--primary);
    border-radius: 3px;
    margin-bottom: 8px;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.7) 2px, rgba(0, 0, 0, 0.7) 4px);
}

.icon-crt-bands {
    width: 35px;
    height: 30px;
    border-radius: 3px;
    margin-bottom: 8px;
    border: 1px solid #444;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary) 37.5%, #ffffffcc 37.5%, #ffffffcc 62.5%, var(--primary) 62.5%, var(--primary) 100%);
}

/* UI Chargement et Résultat */
#loading {
    text-align: center;
    margin-top: 2rem;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

#result {
    text-align: center;
    margin-top: 2rem;
}

video {
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #000;
}

.btn-download {
    display: block;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
}