/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Poppins', 'Arial', sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: #0a0e27;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(252, 70, 107, 0.3), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 180, 219, 0.2), transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1400px;
    margin: auto;
    padding: 30px;
    width: 100%;
}

/* Compact setup page styles */
.setup-page {
    margin: 0;
    padding: 0;
    background: #0a0e27;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(252, 70, 107, 0.3), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 180, 219, 0.2), transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.container-compact {
    width: 100%;
    max-width: 1400px;
    margin: auto;
    padding: 20px;
}

.compact-header {
    text-align: center;
    padding: 30px;
    position: relative;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.compact-header h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow:
        0 0 10px rgba(120, 119, 198, 0.8),
        0 0 20px rgba(120, 119, 198, 0.6),
        0 0 30px rgba(120, 119, 198, 0.4),
        0 5px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.compact-header h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow:
        0 0 10px rgba(120, 119, 198, 0.8),
        0 0 20px rgba(120, 119, 198, 0.6),
        0 0 30px rgba(120, 119, 198, 0.4),
        0 5px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.game-title-input {
    font-size: 3.5em;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow:
        0 0 10px rgba(120, 119, 198, 0.8),
        0 0 20px rgba(120, 119, 198, 0.6),
        0 0 30px rgba(120, 119, 198, 0.4),
        0 5px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    background: transparent;
    border: 2px solid transparent;
    text-align: center;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.game-title-input:focus {
    outline: none;
    border-color: rgba(120, 119, 198, 0.6);
    background: rgba(10, 14, 39, 0.3);
}

@keyframes titlePulse {

    0%,
    100% {
        transform: scale(1);
        text-shadow:
            0 0 10px rgba(120, 119, 198, 0.8),
            0 0 20px rgba(120, 119, 198, 0.6),
            0 0 30px rgba(120, 119, 198, 0.4),
            0 5px 20px rgba(0, 0, 0, 0.5);
    }

    50% {
        transform: scale(1.02);
        text-shadow:
            0 0 15px rgba(120, 119, 198, 1),
            0 0 30px rgba(120, 119, 198, 0.8),
            0 0 45px rgba(120, 119, 198, 0.6),
            0 5px 20px rgba(0, 0, 0, 0.5);
    }
}

.compact-main {
    display: flex;
    justify-content: center;
}

.setup-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 100%;
    width: 100%;
    padding: 40px 20px;
}

.field-section {
    display: flex;
    justify-content: center;
    width: 100%;
}

.config-section {
    width: 100%;
    max-width: 1000px;
}

.config-section h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

/* Grid and controls container */
.grid-and-controls {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
}

/* Typography */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Buttons */
.btn {
    background: #3498db;
    color: white;
    border: 2px solid;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: #3498db;
}

.btn-success {
    background: linear-gradient(135deg, #00b4db, #0083b0);
    border-color: #00b4db;
}

.btn-danger {
    background: linear-gradient(135deg, #fc466b, #d43f5a);
    border-color: #fc466b;
}

.btn-secondary {
    background: linear-gradient(135deg, #434c5e, #2e3440);
    border-color: #434c5e;
}

.btn-large {
    font-size: 24px;
    padding: 18px 40px;
}

.btn-small {
    font-size: 14px;
    padding: 10px 20px;
}

/* Form elements */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #e0e0e0;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(120, 119, 198, 0.3);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(20, 25, 45, 0.6);
    color: #e0e0e0;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #7877c6;
    box-shadow: 0 0 20px rgba(120, 119, 198, 0.5);
    background: rgba(20, 25, 45, 0.9);
}

/* Team setup */
.team-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* Game grid */
.game-grid-preview,
.game-grid {
    display: inline-block;
    background: rgba(15, 20, 40, 0.8);
    border: 3px solid rgba(120, 119, 198, 0.5);
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 0 60px rgba(120, 119, 198, 0.3), 0 15px 40px rgba(0, 0, 0, 0.6);
    margin: 60px auto 80px auto;
    transform-origin: center;
    max-width: 95vw;
    max-height: 70vh;
}

.grid-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 20px;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

.grid-header {
    display: grid;
    background: linear-gradient(135deg, rgba(20, 25, 45, 0.9), rgba(30, 35, 60, 0.9));
    color: #e0e0e0;
    font-weight: bold;
    border-bottom: 2px solid rgba(120, 119, 198, 0.4);
    padding-right: 60px;
}

.grid-header>div {
    padding: 18px;
    text-align: center;
    border-right: 1px solid rgba(120, 119, 198, 0.2);
    font-size: 18px;
    text-shadow: 0 0 10px rgba(120, 119, 198, 0.5);
}

.grid-header>div:last-child {
    border-right: none;
}

.grid-body {
    display: grid;
    padding-right: 60px;
    flex-shrink: 0;
}

.row-label {
    background: linear-gradient(135deg, rgba(20, 25, 45, 0.9), rgba(30, 35, 60, 0.9));
    color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-right: 1px solid rgba(120, 119, 198, 0.2);
    border-bottom: 1px solid rgba(120, 119, 198, 0.2);
    font-size: 18px;
    text-shadow: 0 0 10px rgba(120, 119, 198, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.row-label .row-number {
    transition: opacity 0.3s ease;
}

.row-label .delete-icon {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 24px;
}

.row-label:hover {
    background: linear-gradient(135deg, rgba(252, 70, 107, 0.6), rgba(220, 40, 80, 0.6));
}

.row-label:hover .row-number {
    opacity: 0;
}

.row-label:hover .delete-icon {
    opacity: 1;
}

.add-column-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background: rgb(120, 119, 198);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 2px solid rgba(120, 119, 198, 0.6);
    border-radius: 0;
    z-index: 10;
    color: white;
}

.add-column-btn:hover {
    background: rgb(100, 99, 178);
}

.column-header {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.column-header .column-letter {
    transition: opacity 0.3s ease;
}

.column-header .delete-icon {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 24px;
}

.column-header:hover {
    background: linear-gradient(135deg, rgba(252, 70, 107, 0.6), rgba(220, 40, 80, 0.6));
}

.column-header:hover .column-letter {
    opacity: 0;
}

.column-header:hover .delete-icon {
    opacity: 1;
}

.add-row-btn {
    background: rgb(120, 119, 198);
    color: white;
    font-weight: bold;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    border-top: 2px solid rgba(120, 119, 198, 0.6);
    transition: all 0.3s ease;
    font-size: 24px;
    border-radius: 0;
}

.add-row-btn:hover {
    background: rgb(100, 99, 178);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.field-cell,
.game-field {
    width: 120px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(120, 119, 198, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(90, 100, 140, 1), rgba(110, 120, 160, 1));
    font-weight: 900;
    font-size: 28px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border-right: none;
    border-bottom: none;
}

.field-cell.configured {
    background: linear-gradient(135deg, rgba(110, 120, 160, 1), rgba(130, 140, 180, 1));
    color: #ffffff;
    box-shadow: 0 0 20px rgba(120, 119, 198, 0.4);
    border-color: rgba(120, 119, 198, 0.6);
}

.field-cell.question {
    background: linear-gradient(135deg, rgba(0, 180, 219, 0.8), rgba(0, 140, 180, 0.8));
    color: #ffffff;
    box-shadow: 0 0 25px rgba(0, 180, 219, 0.5);
    border-color: rgba(0, 180, 219, 0.8);
    text-shadow: 0 0 15px rgba(0, 180, 219, 0.8);
}

.field-cell.joker {
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.7), rgba(255, 160, 0, 0.7));
    color: #ffffff;
    box-shadow: 0 0 25px rgba(255, 200, 0, 0.5);
    border-color: rgba(255, 200, 0, 0.8);
    text-shadow: 0 0 15px rgba(255, 200, 0, 0.8);
}

.field-cell.risk {
    background: linear-gradient(135deg, rgba(252, 70, 107, 0.8), rgba(220, 40, 80, 0.8));
    color: #ffffff;
    box-shadow: 0 0 25px rgba(252, 70, 107, 0.5);
    border-color: rgba(252, 70, 107, 0.8);
    text-shadow: 0 0 15px rgba(252, 70, 107, 0.8);
}

.image-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 16px;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Game specific styles */
.game-field {
    background: linear-gradient(135deg, rgba(40, 45, 55, 1), rgba(50, 55, 65, 1));
    color: #ffffff;
    font-size: 28px;
    border: none;
}

.game-field.revealed {
    cursor: not-allowed;
    filter: none;
}

.game-field.revealed:not(.joker):not(.risk) {
    background: linear-gradient(135deg, rgb(0, 180, 255), rgb(0, 140, 220));
    box-shadow: 0 0 40px rgba(0, 180, 255, 0.8);
    border: none;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.game-field.joker {
    background: linear-gradient(135deg, rgb(255, 200, 0), rgb(255, 160, 0));
    box-shadow: 0 0 40px rgba(255, 200, 0, 0.8);
    border: none;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.game-field.risk {
    background: linear-gradient(135deg, rgb(255, 50, 100), rgb(220, 30, 80));
    box-shadow: 0 0 40px rgba(255, 50, 100, 0.8);
    border: none;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Question setup */
.question-setup {
    background: rgba(20, 25, 45, 0.6);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid rgba(120, 119, 198, 0.3);
}

.field-type-selector {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.field-type-selector label {
    cursor: pointer;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.field-type-selector label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.field-type-selector input[type="radio"] {
    margin-right: 8px;
}

.field-type-selector label:has(input:checked) {
    background: linear-gradient(135deg, rgba(0, 180, 219, 0.4), rgba(120, 119, 198, 0.4));
    color: #ffffff;
    border-color: rgba(120, 119, 198, 0.6);
    box-shadow: 0 4px 15px rgba(120, 119, 198, 0.3);
}

.question-input label {
    display: block;
    margin-bottom: 8px;
    margin-top: 15px;
    font-weight: 700;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
}

.risk-checkbox-container {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(252, 70, 107, 0.15), rgba(220, 40, 80, 0.1));
    border-radius: 12px;
    border: 2px solid rgba(252, 70, 107, 0.4);
    transition: all 0.3s ease;
}

.risk-checkbox-container:hover {
    background: linear-gradient(135deg, rgba(252, 70, 107, 0.2), rgba(220, 40, 80, 0.15));
    border-color: rgba(252, 70, 107, 0.5);
}

.risk-checkbox-container label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
}

.risk-checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: rgba(252, 70, 107, 0.8);
}

/* Image upload styles */
.image-upload-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.image-input {
    display: none;
}

.image-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(120, 119, 198, 0.2), rgba(0, 180, 219, 0.2));
    border: 2px solid rgba(120, 119, 198, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.upload-icon {
    font-size: 16px;
}

.upload-text {
    font-size: 13px;
}

.btn-remove-image {
    padding: 15px 20px;
    background: rgba(252, 70, 107, 0.2);
    border: 2px solid rgba(252, 70, 107, 0.4);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    margin-top: 15px;
}

.image-preview {
    margin-top: 15px;
    padding: 15px;
    background: rgba(10, 14, 39, 0.3);
    border: 2px solid rgba(120, 119, 198, 0.3);
    border-radius: 12px;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.setup-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Questions overview */
.questions-overview {
    margin-bottom: 15px;
}

.questions-list {
    background: rgba(20, 25, 45, 0.4);
    padding: 15px;
    border-radius: 6px;
    min-height: 80px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(120, 119, 198, 0.3);
}

/* Custom scrollbar for questions list */
.questions-list::-webkit-scrollbar {
    width: 8px;
}

.questions-list::-webkit-scrollbar-track {
    background: rgba(20, 25, 45, 0.6);
    border-radius: 4px;
}

.questions-list::-webkit-scrollbar-thumb {
    background: rgba(120, 119, 198, 0.6);
    border-radius: 4px;
}

.question-item {
    background: rgba(30, 35, 60, 0.5);
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 4px;
    border: 1px solid rgba(120, 119, 198, 0.3);
    position: relative;
}

.question-item.joker {
    border-color: rgba(255, 200, 0, 0.6);
}

.question-item.risk {
    border-color: rgba(252, 70, 107, 0.6);
}

.question-item-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}

.question-item-position {
    font-weight: bold;
    color: #e0e0e0;
}

.question-item-type {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    color: white;
    background: rgba(0, 180, 219, 0.6);
}

.question-item-type.joker {
    background: rgba(255, 200, 0, 0.6);
}

.question-item-type.risk {
    background: rgba(252, 70, 107, 0.6);
}

.question-item-text {
    color: #c0c0c0;
    margin-bottom: 3px;
    font-size: 14px;
    line-height: 1.4;
}



.delete-question {
    background: linear-gradient(135deg, rgba(252, 70, 107, 0.6), rgba(220, 40, 80, 0.6));
    color: white;
    border: 1px solid rgba(252, 70, 107, 0.4);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    float: right;
    transition: all 0.3s ease;
}

.no-questions {
    text-align: center;
    color: #808080;
    font-style: italic;
}

/* Game controls */
.game-controls {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

.game-controls .btn {
    width: auto;
    min-width: 140px;
    padding: 12px 24px;
    font-size: 16px;
    margin: 0;
}

.game-controls-compact {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 10px;
    background: #f8f9fa;
    border-top: 1px solid #bdc3c7;
}

.btn-compact {
    padding: 8px 15px;
    font-size: 14px;
}

/* Game header */
.game-header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.game-header h1 {
    color: white;
    margin-bottom: 20px;
}

.teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

.team {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
}

.team h2 {
    margin-bottom: 10px;
    border: none;
    color: white;
}

.score {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.score-controls {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.current-turn {
    background: #f39c12;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.current-team {
    font-size: 18px;
    font-weight: bold;
}

.team.active-team {
    background: rgba(241, 196, 15, 0.3);
    border: 2px solid #f1c40f;
}

/* Compact game page styles */
.game-page {
    margin: 0;
    padding: 0;
    background: #0a0e27;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(252, 70, 107, 0.3), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 180, 219, 0.2), transparent 50%);
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.game-container-compact {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.game-header-compact {
    background: transparent;
    color: #e0e0e0;
    padding: 15px 20px;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 0;
    border: none;
    flex-shrink: 0;
}

.game-title-display {
    text-align: center;
    font-size: 70px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow:
        0 0 10px rgba(120, 119, 198, 0.8),
        0 0 20px rgba(120, 119, 198, 0.6),
        0 0 30px rgba(120, 119, 198, 0.4);
    margin-bottom: 40px;
}

.team-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.team-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    background: rgba(120, 119, 198, 0.1);
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid rgba(120, 119, 198, 0.2);
}

.team-name-input-compact {
    background: rgba(30, 35, 60, 0.8);
    color: #e0e0e0;
    border: 1px solid rgba(120, 119, 198, 0.3);
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    max-width: 80px;
}

.team-name-input-compact:focus {
    outline: none;
    border-color: rgba(120, 119, 198, 0.8);
    background: rgba(30, 35, 60, 0.95);
    box-shadow: 0 0 15px rgba(120, 119, 198, 0.4);
}

.team-name-input-compact:disabled {
    background: rgba(30, 35, 60, 0.6);
}

.edit-name-btn-compact {
    background: rgba(120, 119, 198, 0.3);
    border: 1px solid rgba(120, 119, 198, 0.4);
    color: #e0e0e0;
    border-radius: 3px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.score-compact {
    font-weight: bold;
    font-size: 20px;
    background: linear-gradient(135deg, #00b4db, #7877c6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(0, 180, 219, 0.5));
}

.score-controls-compact {
    display: flex;
    gap: 3px;
}

.btn-tiny {
    padding: 3px 6px;
    font-size: 11px;
    border: 1px solid rgba(120, 119, 198, 0.4);
    border-radius: 3px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(0, 180, 219, 0.4), rgba(120, 119, 198, 0.4));
    color: #e0e0e0;
}

.btn-tiny.btn-danger {
    background: #e74c3c;
}

.game-main-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.game-board-large {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-grid-large {
    transform: scale(1.5);
    margin: 40px;
}

/* New full-size game layout */
.team-bar-new {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto 10px;
    padding: 0 20px;
}

.team-section {
    text-align: center;
    background: linear-gradient(135deg, rgba(30, 35, 60, 0.95), rgba(50, 55, 90, 0.95));
    padding: 20px 25px;
    border-radius: 25px;
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    border: 4px solid;
    box-shadow: 0 0 60px;
    backdrop-filter: blur(15px);
    position: relative;
}

.team-section.team1 {
    border-color: #00b4db;
    box-shadow: 0 0 60px rgba(0, 180, 219, 0.6);
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(0, 100, 150, 0.95), rgba(0, 180, 219, 0.85));
}

.team-section.team2 {
    border-color: #fc466b;
    box-shadow: 0 0 60px rgba(252, 70, 107, 0.6);
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(150, 30, 60, 0.95), rgba(252, 70, 107, 0.85));
}

.team-left,
.team-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.team-left {
    align-items: flex-end;
}

.team-right {
    align-items: flex-start;
}

.team-name-input-large {
    background: transparent;
    color: #ffffff;
    border: none;
    border-radius: 0;
    padding: 5px 10px;
    font-size: 40px;
    font-weight: 900;
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    filter: drop-shadow(0 0 15px currentColor);
}

.team-left .team-name-input-large {
    text-align: right;
}

.team-right .team-name-input-large {
    text-align: left;
}

.team-name-input-large:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 30px currentColor;
    transform: scale(1.05);
}

.score-large {
    font-size: 130px;
    line-height: 140px;
    padding-bottom: 10px;
    font-weight: 900;
    color: #ffffff;
    min-width: 250px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.score-large.score-animate {
    animation: scoreChange 1.2s ease-out;
}

@keyframes scoreChange {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 40px currentColor);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px currentColor);
    }
}

.score-controls-new {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-score {
    padding: 12px 24px;
    font-size: 18px;
    font-weight: 900;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2));
    color: #ffffff;
    transition: all 0.2s ease;
    min-width: 80px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.btn-score::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn-score:active::before {
    width: 300px;
    height: 300px;
}

.btn-score:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-score.btn-danger {
    background: linear-gradient(135deg, rgba(252, 70, 107, 0.8), rgba(220, 40, 80, 0.8));
    border-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 15px rgba(252, 70, 107, 0.5);
}

.btn-score.btn-danger:active {
    box-shadow: 0 2px 8px rgba(252, 70, 107, 0.6);
}

.game-controls-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.game-main-fullsize {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    overflow: visible;
    flex: 1;
    min-height: 0;
}

.game-board-fullsize {
    width: auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow: visible;
}

.game-grid-huge {
    transform: none;
    margin: 0;
    max-width: 95vw;
    max-height: 100%;
}

.game-grid-huge .grid-header {
    padding-right: 0;
}

.game-grid-huge .grid-body {
    padding-right: 0;
}

.game-grid-huge .game-field {
    width: 100%;
    min-height: 80px;
}

/* Team name editing */
.team-name-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.team-name-input {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    max-width: 150px;
}

.team-name-input:focus {
    outline: none;
    border-color: #f1c40f;
    background: white;
    transform: scale(1.05);
}

.team-name-input:disabled {
    background: rgba(255, 255, 255, 0.7);
    cursor: default;
}

.edit-name-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* Question modal */
/* Super Cool Question Overlay */
.question-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.question-overlay.fade-out .overlay-background {
    animation: backgroundFadeOut 0.5s ease-out forwards;
}

.question-overlay.fade-out .question-content-large {
    animation: contentFadeOut 0.5s ease-out forwards;
}

@keyframes backgroundFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes contentFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.overlay-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow: hidden;
    animation: backgroundFadeIn 0.3s ease-out;
}

@keyframes backgroundFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Blue background for regular questions */
.overlay-question .overlay-background {
    background: linear-gradient(135deg, rgba(0, 180, 219, 0.5), rgba(0, 140, 180, 0.5));
}

/* Yellow background for joker fields */
.overlay-joker .overlay-background {
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.5), rgba(255, 160, 0, 0.5));
}

/* Red background for risk fields */
.overlay-risk .overlay-background {
    background: linear-gradient(135deg, rgba(185, 31, 62, 0.6), rgba(131, 7, 34, 0.6));
}

.question-content-large {
    position: relative;
    z-index: 1001;
    max-width: 90%;
    width: 1200px;
    text-align: center;
    animation: contentZoomIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes contentZoomIn {
    from {
        transform: scale(0.5) rotateX(-20deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotateX(0deg);
        opacity: 1;
    }
}

.question-title-huge {
    font-size: 40px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    margin-bottom: 50px;
}

.question-text-huge {
    font-size: 72px;
    line-height: 1.4;
    color: white;
    margin-bottom: 60px;
    font-weight: 800;
    text-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4);
}

.question-image-container {
    margin: 40px 0 60px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.question-image-container img {
    max-width: 90%;
    max-height: 500px;
    border-radius: 15px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.btn-continue {
    font-size: 22px;
    padding: 18px 50px;
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.8), rgba(58, 134, 255, 0.8));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 0 4px 20px rgba(131, 56, 236, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.btn-continue:active {
    transform: scale(0.98) translateY(2px);
    box-shadow: 0 2px 10px rgba(131, 56, 236, 0.5);
}

/* Risk overlay button - red theme */
.overlay-risk .btn-continue {
    background: linear-gradient(135deg, rgba(252, 70, 107, 0.9), rgba(220, 40, 80, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 20px rgba(252, 70, 107, 0.5);
}

.overlay-risk .btn-continue:active {
    box-shadow: 0 2px 10px rgba(252, 70, 107, 0.6);
}

/* Joker overlay button - yellow/green theme */
.overlay-joker .btn-continue {
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.9), rgba(255, 160, 0, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 20px rgba(255, 200, 0, 0.5);
}

.overlay-joker .btn-continue:active {
    box-shadow: 0 2px 10px rgba(255, 200, 0, 0.6);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .container-compact {
        padding: 5px;
    }

    .setup-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .field-type-selector {
        flex-direction: column;
        gap: 5px;
    }

    .team-inputs {
        grid-template-columns: 1fr;
    }

    .teams {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .team-bar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .team-bar-new {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .team-section {
        padding: 15px;
    }

    .score-large {
        font-size: 36px;
    }

    .team-compact {
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    .game-grid-large {
        transform: scale(1.2);
        margin: 20px;
    }

    .game-grid-huge {
        transform: scale(1.8);
        margin: 30px;
    }

    .team-name-container {
        flex-direction: column;
        gap: 5px;
    }

    .team-name-input {
        font-size: 16px;
        max-width: 120px;
    }

    .grid-header,
    .grid-body {
        grid-template-columns: 40px repeat(6, 80px);
    }

    .field-cell,
    .game-field {
        width: 80px;
        height: 60px;
        font-size: 14px;
    }

    h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {

    .grid-header,
    .grid-body {
        grid-template-columns: 30px repeat(6, 60px);
    }

    .field-cell,
    .game-field {
        width: 60px;
        height: 50px;
        font-size: 12px;
    }

    .score-controls {
        flex-direction: column;
    }

    .question-title-huge {
        font-size: 32px;
        margin-bottom: 30px;
        letter-spacing: 3px;
    }

    .question-text-huge {
        font-size: 36px;
        margin-bottom: 40px;
    }

    .btn-continue {
        font-size: 16px;
        padding: 10px 24px;
    }

    .team-name-input {
        font-size: 14px;
        max-width: 100px;
        padding: 6px 8px;
    }

    .edit-name-btn {
        font-size: 12px;
        padding: 4px 6px;
    }

    .game-grid-large {
        transform: scale(1.0);
        margin: 10px;
    }

    .game-controls-compact {
        flex-wrap: wrap;
        gap: 5px;
    }

    .btn-compact {
        padding: 6px 10px;
        font-size: 12px;
    }

    .game-grid-huge {
        transform: scale(1.2);
        margin: 15px;
    }

    .score-large {
        font-size: 28px;
    }

    .team-name-input-large {
        font-size: 16px;
        max-width: 150px;
    }

    .btn-score {
        font-size: 14px;
        padding: 6px 12px;
        min-width: 50px;
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, rgba(15, 20, 40, 0.98), rgba(25, 30, 55, 0.98));
    margin: 8% auto;
    border: 1px solid rgba(120, 119, 198, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(120, 119, 198, 0.15), rgba(0, 180, 219, 0.1));
    border-bottom: 1px solid rgba(120, 119, 198, 0.2);
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.5em;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(120, 119, 198, 0.5);
    letter-spacing: 0.5px;
}

.close {
    color: rgba(255, 255, 255, 0.6);
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.modal-body textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    font-size: 16px;
    font-family: inherit;
    background: rgba(10, 14, 39, 0.5);
    color: #ffffff;
    border: 2px solid rgba(120, 119, 198, 0.3);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.modal-body textarea:focus {
    outline: none;
    border-color: rgba(120, 119, 198, 0.6);
    box-shadow: 0 0 20px rgba(120, 119, 198, 0.3);
    background: rgba(10, 14, 39, 0.7);
}

.modal-body textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.modal-footer {
    padding: 20px 30px 30px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}