/* modal-desktop.css - Desktop-optimized modal and form styles */

/* ========================================
   MODAL - DESKTOP OPTIMIZED
   ======================================== */

.modal-content {
    background: linear-gradient(180deg,
        rgba(18, 22, 35, 0.98) 0%,
        rgba(12, 15, 28, 0.99) 100%);
    border: 2px solid rgba(100, 150, 255, 0.35);
    padding: 2rem 2.5rem;
    border-radius: 16px;
    width: 95%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;

    box-shadow:
        0 0 60px rgba(100, 150, 255, 0.15),
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Accent line */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        rgba(100, 180, 255, 0.8),
        transparent);
    border-radius: 0 0 3px 3px;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #ffffff;
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-shadow: 0 0 30px rgba(100, 180, 255, 0.5);
    text-align: center;
}

/* ========================================
   FORM - 2 COLUMN GRID FOR DESKTOP
   ======================================== */

.modal-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
}

/* Full-width elements */
.modal-form > .input-group:first-child,
.modal-form > #custom-size-options,
.modal-form > .ai-players-section,
.modal-form > .dialog-buttons,
.modal-form > .settings-section {
    grid-column: 1 / -1;
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(150, 180, 255, 0.8);
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Form Inputs - Game Style */
.modal-form .player-input,
.modal-form input,
.modal-form select {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    border-radius: 8px;
    border: 2px solid rgba(100, 150, 255, 0.2);
    background: linear-gradient(180deg,
        rgba(30, 40, 60, 0.8) 0%,
        rgba(20, 30, 50, 0.9) 100%);
    color: #ffffff;
    transition: all 0.2s ease;

    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal-form .player-input:focus,
.modal-form input:focus,
.modal-form select:focus {
    outline: none;
    border-color: rgba(100, 180, 255, 0.6);
    background: linear-gradient(180deg,
        rgba(35, 50, 75, 0.9) 0%,
        rgba(25, 40, 65, 0.95) 100%);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(100, 150, 255, 0.15);
}

.modal-form .player-input::placeholder {
    color: rgba(150, 170, 200, 0.5);
}

/* Select dropdown arrow */
.modal-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2399aacc' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Hints */
.hint {
    font-size: 0.75rem;
    color: rgba(150, 180, 255, 0.5);
    font-style: italic;
}

/* Custom Size Options - 3 column grid */
#custom-size-options {
    display: none;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(100, 150, 255, 0.05);
    border: 1px solid rgba(100, 150, 255, 0.15);
    border-radius: 10px;
    margin-top: 0.5rem;
}

#custom-size-options[style*="block"],
#custom-size-options.visible {
    display: grid !important;
}

/* ========================================
   AI PLAYERS SECTION - HORIZONTAL LAYOUT
   ======================================== */

.ai-players-section {
    margin-top: 0.5rem !important;
    padding: 1.5rem !important;
    background: linear-gradient(180deg,
        rgba(40, 50, 80, 0.3) 0%,
        rgba(30, 40, 70, 0.4) 100%) !important;
    border-radius: 12px !important;
    border: 2px solid rgba(100, 150, 255, 0.2) !important;
}

.ai-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem !important;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(100, 150, 255, 0.15);
}

.ai-section-title {
    font-size: 1.1rem !important;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff !important;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-total-indicator {
    background: rgba(100, 150, 255, 0.2) !important;
    color: #80b0ff !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    font-family: 'Orbitron', monospace;
}

.ai-total-indicator.has-ai {
    background: rgba(80, 255, 120, 0.2) !important;
    color: #60ff90 !important;
    box-shadow: 0 0 15px rgba(80, 255, 120, 0.2);
}

.ai-info-toggle {
    background: linear-gradient(180deg,
        rgba(60, 80, 120, 0.8) 0%,
        rgba(45, 65, 105, 0.8) 100%) !important;
    border: 1px solid rgba(100, 150, 255, 0.3) !important;
    color: #ffffff !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-info-toggle:hover {
    background: linear-gradient(180deg,
        rgba(75, 100, 150, 0.9) 0%,
        rgba(60, 85, 135, 0.9) 100%) !important;
    border-color: rgba(100, 180, 255, 0.5) !important;
}

/* AI Selectors - 3 Column Horizontal Layout */
.ai-selectors {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
    margin-bottom: 0 !important;
}

.ai-selector {
    background: linear-gradient(180deg,
        rgba(35, 45, 70, 0.8) 0%,
        rgba(25, 35, 60, 0.9) 100%) !important;
    border: 2px solid rgba(100, 150, 255, 0.15) !important;
    border-radius: 10px !important;
    padding: 1.25rem !important;
    transition: all 0.2s ease !important;
    text-align: center;
}

.ai-selector:hover {
    background: linear-gradient(180deg,
        rgba(45, 60, 90, 0.85) 0%,
        rgba(35, 50, 80, 0.9) 100%) !important;
    border-color: rgba(100, 180, 255, 0.35) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.ai-selector-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-bottom: 0.75rem !important;
}

.ai-difficulty-name {
    font-size: 1rem !important;
    font-weight: 700 !important;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-difficulty-beginner {
    color: #60ff90 !important;
    text-shadow: 0 0 10px rgba(96, 255, 144, 0.4);
}
.ai-difficulty-intermediate {
    color: #ffb060 !important;
    text-shadow: 0 0 10px rgba(255, 176, 96, 0.4);
}
.ai-difficulty-expert {
    color: #ff6060 !important;
    text-shadow: 0 0 10px rgba(255, 96, 96, 0.4);
}

.ai-count-display {
    font-size: 0.85rem !important;
    color: #b0c0e0 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    padding: 0.375rem 0.875rem !important;
    border-radius: 20px !important;
    font-family: 'Orbitron', monospace;
    font-weight: 500;
}

.ai-controls {
    display: flex !important;
    gap: 0.75rem !important;
    justify-content: center !important;
    margin: 0.75rem 0 !important;
}

.ai-control-btn {
    background: linear-gradient(180deg,
        rgba(70, 90, 130, 0.9) 0%,
        rgba(55, 75, 115, 0.9) 100%) !important;
    border: 2px solid rgba(100, 150, 255, 0.3) !important;
    color: #ffffff !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 1.25rem !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.ai-control-btn:hover {
    background: linear-gradient(180deg,
        rgba(90, 120, 170, 0.95) 0%,
        rgba(75, 105, 155, 0.95) 100%) !important;
    border-color: rgba(100, 180, 255, 0.6) !important;
    transform: scale(1.1) !important;
    box-shadow:
        0 0 15px rgba(100, 150, 255, 0.3),
        0 3px 10px rgba(0, 0, 0, 0.3) !important;
}

.ai-control-btn:active {
    transform: scale(0.95) !important;
}

.ai-description {
    font-size: 0.75rem !important;
    color: rgba(150, 180, 220, 0.7) !important;
    line-height: 1.4 !important;
    margin-top: 0.5rem;
}

/* AI Info Panel */
.ai-info-panel {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(100, 150, 255, 0.15);
}

/* ========================================
   BOTTOM FORM FIELDS - 2 COLUMN
   ======================================== */

/* Settings sections (Lives, Grenades, etc) */
.settings-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(100, 150, 255, 0.15);
}

.settings-section h4 {
    grid-column: 1 / -1;
    font-size: 1rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(150, 180, 255, 0.8);
    margin-bottom: 0.5rem;
}

/* Dialog Buttons */
.dialog-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(100, 150, 255, 0.15);
}

.modal .button,
.dialog-buttons .button {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 10px;
    border: 2px solid rgba(100, 150, 255, 0.4);
    background: linear-gradient(180deg,
        rgba(70, 100, 160, 0.9) 0%,
        rgba(55, 85, 145, 0.9) 100%);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;

    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.modal .button:hover,
.dialog-buttons .button:hover {
    background: linear-gradient(180deg,
        rgba(90, 125, 190, 0.95) 0%,
        rgba(75, 110, 175, 0.95) 100%);
    border-color: rgba(100, 180, 255, 0.6);
    transform: translateY(-2px);
    box-shadow:
        0 0 25px rgba(100, 150, 255, 0.25),
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.modal .button.cancel,
.modal .button.secondary,
.dialog-buttons .button.cancel,
.dialog-buttons .button.secondary {
    background: linear-gradient(180deg,
        rgba(50, 55, 75, 0.9) 0%,
        rgba(35, 40, 60, 0.9) 100%);
    border-color: rgba(150, 160, 180, 0.2);
}

.modal .button.cancel:hover,
.modal .button.secondary:hover,
.dialog-buttons .button.cancel:hover,
.dialog-buttons .button.secondary:hover {
    background: linear-gradient(180deg,
        rgba(65, 70, 95, 0.95) 0%,
        rgba(50, 55, 80, 0.95) 100%);
    border-color: rgba(150, 160, 180, 0.4);
}

/* ========================================
   LIGHT THEME
   ======================================== */

.theme-light .modal-content {
    background: linear-gradient(180deg,
        rgba(245, 248, 255, 0.99) 0%,
        rgba(235, 240, 252, 0.99) 100%);
    border-color: rgba(100, 130, 200, 0.35);
}

.theme-light .modal-title {
    color: #1a1a2e;
    text-shadow: none;
}

.theme-light .input-group label {
    color: rgba(50, 70, 120, 0.8);
}

.theme-light .modal-form .player-input,
.theme-light .modal-form input,
.theme-light .modal-form select {
    background: linear-gradient(180deg,
        rgba(230, 238, 255, 0.95) 0%,
        rgba(220, 230, 250, 0.95) 100%);
    border-color: rgba(100, 130, 200, 0.25);
    color: #1a1a2e;
}

.theme-light .ai-players-section {
    background: linear-gradient(180deg,
        rgba(220, 230, 255, 0.5) 0%,
        rgba(210, 225, 250, 0.6) 100%) !important;
    border-color: rgba(100, 130, 200, 0.25) !important;
}

.theme-light .ai-selector {
    background: linear-gradient(180deg,
        rgba(235, 242, 255, 0.95) 0%,
        rgba(225, 235, 250, 0.95) 100%) !important;
    border-color: rgba(100, 130, 200, 0.2) !important;
}

.theme-light .ai-section-title,
.theme-light .ai-difficulty-name {
    color: #1a1a2e !important;
}

.theme-light .ai-description {
    color: rgba(50, 70, 120, 0.7) !important;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        padding: 1.5rem;
    }

    .modal-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ai-selectors {
        grid-template-columns: 1fr !important;
    }

    #custom-size-options {
        grid-template-columns: 1fr !important;
    }

    .settings-section {
        grid-template-columns: 1fr;
    }

    .dialog-buttons {
        flex-direction: column;
    }

    .modal .button,
    .dialog-buttons .button {
        width: 100%;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 480px) {
    .modal-content {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .modal-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .ai-selector {
        padding: 1rem !important;
    }

    .ai-control-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 1.1rem !important;
    }
}
