:root {
    --bg-color: #050505;
    --text: #f3f4f6;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --surface: #111;
    --border: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#app-container {
    text-align: center;
    max-width: 700px;
    padding: 3rem;
    width: 100%;
    background: var(--surface);
    border-radius: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header {
    margin-bottom: 3rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.highlight {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: #9ca3af;
    font-size: 1.2rem;
    font-weight: 400;
}

.instructions {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 3rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #d1d5db;
    border: 1px solid var(--border);
}

.actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.secondary-btn {
    background: transparent;
    border: 2px solid #374151;
    color: #d1d5db;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    border-color: var(--text);
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.color-preview {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.preview-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: default;
    transition: transform 0.2s;
}

.preview-dot:hover {
    transform: scale(1.2);
}

/* Test Area */
#test-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    cursor: none;
    outline: none;
}

#test-area.hidden {
    display: none;
}

#instruction-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem 2rem;
    border-radius: 2rem;
    pointer-events: none;
    animation: fadeOut 3s forwards;
    animation-delay: 1.5s;
    font-weight: 600;
    letter-spacing: 0.05em;
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #1f2937;
    padding: 2.5rem;
    border-radius: 1.5rem;
    max-width: 450px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    color: var(--danger);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    margin-bottom: 2rem;
    color: #d1d5db;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.danger-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.danger-btn:hover {
    background: #b91c1c;
}

.text-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

.text-btn:hover {
    color: white;
}

/* Fixer Area */
#fixer-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#fixer-area.hidden {
    display: none;
}

.noise-box {
    width: 250px;
    height: 250px;
    background: white;
    animation: noise 0.04s infinite;
    cursor: move;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
}

@keyframes noise {
    0% {
        background-color: #ff0000;
    }

    20% {
        background-color: #00ff00;
    }

    40% {
        background-color: #0000ff;
    }

    60% {
        background-color: #ffff00;
    }

    80% {
        background-color: #00ffff;
    }

    100% {
        background-color: #ff00ff;
    }
}

#stop-fixer {
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#stop-fixer:hover {
    background: white;
    color: black;
}

.fixer-hint {
    margin-top: 1.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}