* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-red: #ff003c;
    --neon-green: #00ff47;
    --neon-blue: #00f0ff;
    --acid-yellow: #ff0;
    --black: #000;
    --white: #fff;
    --gray: #333;
    --dark-gray: #111;
}

body {
    font-family: 'Roboto Mono', monospace;
    background: var(--black);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.4;
}

/* Брутальный фон */
.brutal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.1;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
}

.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 49%,
        var(--neon-red) 49%,
        var(--neon-red) 51%,
        transparent 51%
    );
    opacity: 0.02;
    animation: glitch-bg 10s infinite linear;
}

@keyframes glitch-bg {
    0%, 100% { transform: translateX(0) skewX(0); }
    50% { transform: translateX(-10px) skewX(-1deg); }
}

/* Базовые стили */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Приветственный экран */
.brutal-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    border: 4px solid var(--neon-red);
    background: var(--dark-gray);
    position: relative;
    overflow: hidden;
}

.title-glitch h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 4em;
    color: var(--neon-red);
    text-transform: uppercase;
    position: relative;
    animation: glitch 5s infinite;
}

.title-glitch h1::before,
.title-glitch h1::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.title-glitch h1::before {
    animation: glitch-1 0.5s infinite;
    color: var(--neon-green);
    z-index: -1;
}

.title-glitch h1::after {
    animation: glitch-2 0.5s infinite;
    color: var(--neon-blue);
    z-index: -2;
}

.subtitle {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2em;
    color: var(--acid-yellow);
    margin-top: 20px;
    text-transform: uppercase;
}

@keyframes glitch {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-2px); }
    20% { transform: translateX(2px); }
    30% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    50% { transform: translateX(0); }
}

@keyframes glitch-1 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(2px); }
}

.welcome-content {
    text-align: center;
}

.brutal-card {
    background: var(--dark-gray);
    border: 6px solid var(--neon-green);
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    transform: skewX(-1deg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.skull-icon {
    font-size: 3em;
    animation: pulse 2s infinite;
}

.card-header h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5em;
    color: var(--neon-red);
    text-transform: uppercase;
}

.brutal-text {
    margin-bottom: 40px;
}

.brutal-text p {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2em;
    color: var(--acid-yellow);
    line-height: 1.6;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.rule-brick {
    background: var(--gray);
    border: 3px solid var(--neon-blue);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: skewX(-2deg);
    transition: all 0.3s ease;
}

.rule-brick:hover {
    background: var(--neon-blue);
    color: var(--black);
    transform: skewX(-2deg) translateY(-5px);
}

.rule-number {
    font-family: 'Press Start 2P', cursive;
    font-size: 1em;
    color: var(--acid-yellow);
    background: var(--black);
    padding: 5px 10px;
    border: 2px solid var(--acid-yellow);
}

.rule-brick:hover .rule-number {
    color: var(--black);
    background: var(--acid-yellow);
}

.rule-text {
    font-weight: bold;
    text-transform: uppercase;
}

.warning-box {
    background: var(--neon-red);
    color: var(--black);
    padding: 20px;
    border: 4px solid var(--acid-yellow);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9em;
    text-align: center;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Кнопки */
.brutal-btn {
    position: relative;
    background: var(--black);
    border: 4px solid;
    padding: 25px 50px;
    font-family: 'Press Start 2P', cursive;
    font-size: 1em;
    color: var(--white);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
    overflow: hidden;
}

.brutal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.brutal-btn:hover::before {
    left: 100%;
}

.btn-corner {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--white);
}

.top-left { top: -2px; left: -2px; }
.top-right { top: -2px; right: -2px; }
.bottom-left { bottom: -2px; left: -2px; }
.bottom-right { bottom: -2px; right: -2px; }

.start-btn {
    border-color: var(--neon-green);
    color: var(--neon-green);
    font-size: 1.2em;
}

.start-btn:hover {
    background: var(--neon-green);
    color: var(--black);
    transform: translateY(-5px) skewX(-2deg);
}

.check-btn {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.check-btn:hover {
    background: var(--neon-blue);
    color: var(--black);
}

.next-btn {
    border-color: var(--acid-yellow);
    color: var(--acid-yellow);
}

.next-btn:hover {
    background: var(--acid-yellow);
    color: var(--black);
}

.menu-btn {
    border-color: var(--neon-red);
    color: var(--neon-red);
}

.menu-btn:hover {
    background: var(--neon-red);
    color: var(--black);
}

/* Игровой экран */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
}

.header-brick {
    background: var(--dark-gray);
    border: 4px solid var(--neon-green);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 200px;
    transform: skewX(-1deg);
}

.title-brick {
    flex: 2;
    justify-content: center;
    border-color: var(--neon-red);
}

.title-brick h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8em;
    color: var(--neon-red);
    text-transform: uppercase;
}

.brick-icon {
    font-size: 1.5em;
}

/* Вопрос */
.question-brick {
    background: var(--dark-gray);
    border: 6px solid var(--acid-yellow);
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    transform: skewX(-1deg);
}

.question-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#question-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8em;
    color: var(--acid-yellow);
    margin-bottom: 20px;
    line-height: 1.5;
}

.question-underline {
    width: 300px;
    height: 6px;
    background: var(--neon-red);
    margin: 0 auto;
    transform: skewX(-2deg);
}

/* Игровая область */
.game-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.answers-section,
.users-section {
    background: var(--dark-gray);
    border: 4px solid var(--neon-blue);
    padding: 30px;
    transform: skewX(-1deg);
}

.section-title-brick {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.section-title-brick h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2em;
    color: var(--neon-blue);
    text-transform: uppercase;
}

.title-decor {
    width: 30px;
    height: 4px;
    background: var(--neon-red);
}

/* Контейнеры для ответов и пользователей */
.answers-container,
.users-container {
    display: grid;
    gap: 15px;
    min-height: 200px;
}

.answer-slot,
.user-item {
    background: var(--gray);
    border: 3px solid var(--neon-green);
    padding: 20px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    transform: skewX(-1deg);
}

.answer-slot {
    cursor: default;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.user-item {
    cursor: grab;
    border-color: var(--acid-yellow);
}

.user-item:hover {
    background: var(--acid-yellow);
    color: var(--black);
    transform: skewX(-1deg) translateY(-3px);
}

.user-item.dragging {
    opacity: 0.5;
    transform: scale(0.95) skewX(-1deg);
}

.answer-slot.drag-over {
    border-color: var(--neon-red);
    background: var(--neon-red);
    color: var(--black);
}

.answer-text {
    font-weight: bold;
    margin-bottom: 5px;
}

.assigned-user {
    font-size: 0.9em;
    color: var(--neon-blue);
    font-weight: bold;
    min-height: 20px;
}

.answer-slot.correct {
    border-color: var(--neon-green);
    background: var(--neon-green);
    color: var(--black);
}

.answer-slot.incorrect {
    border-color: var(--neon-red);
    background: var(--neon-red);
    color: var(--black);
}

/* Управление */
.controls-brick {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Результат */
.result-brick {
    background: var(--dark-gray);
    border: 4px solid var(--neon-green);
    padding: 30px;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: skewX(-1deg);
}

.result-brick.success {
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.result-brick.error {
    border-color: var(--neon-red);
    color: var(--neon-red);
}

/* Адаптивность */
@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
    
    .game-header {
        flex-direction: column;
    }
    
    .header-brick {
        width: 100%;
    }
    
    .controls-brick {
        flex-direction: column;
        align-items: center;
    }
    
    .brutal-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .title-glitch h1 {
        font-size: 2.5em;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
}
.answers-container,
.answer-slot,
.answer-text,
.assigned-user,
.users-container,
.user-item {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}
.assigned-user {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brutal-btn[disabled]{
  opacity:.45;
  pointer-events:none;
}
.game-grid,
.answers-section,
.users-section,
.result-brick {
  position: relative;   /* чтобы не всплывали над контролами */
  z-index: 1;
}

/* Контролы всегда поверх всего другого контента раунда */
.controls-brick {
  position: relative;
  z-index: 1000;
}

/* Когда disabled — не кликается (видно состояние) */
.brutal-btn[disabled]{
  opacity:.45;
  pointer-events:none;
}
/* ...всё, что у тебя уже было... */

/* запрет выделения текста в dnd-зонах */
.answers-container,
.answer-slot,
.answer-text,
.assigned-user,
.users-container,
.user-item {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}
.assigned-user {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* disabled-кнопки явно некликабельны */
.brutal-btn[disabled]{
  opacity:.45;
  pointer-events:none;
}

/* слойность: контент ниже, контролы сверху */
.game-grid,
.answers-section,
.users-section,
.result-brick {
  position: relative;
  z-index: 1;
}
.controls-brick {
  position: relative;
  z-index: 1000;
}
