/**
 * Setup CSS - Setup Page Styles
 *
 * Contains styles for game setup/configuration pages including:
 * - Setup card and step containers
 * - Player count selector
 * - Round and mode options
 * - Artist type and year range selectors
 * - Genre selection
 * - Toggle and checkbox options
 * - Player name inputs
 * - Navigation buttons
 */

/* ========== 30개 챌린지 바로가기 ========== */
.challenge-shortcut {
    background: var(--gradient-client);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.challenge-shortcut-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.challenge-shortcut-content.locked {
    opacity: 0.9;
}

.challenge-shortcut .challenge-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.challenge-shortcut .challenge-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.challenge-shortcut .challenge-info strong {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
}

.challenge-shortcut .challenge-info span {
    color: var(--overlay-white-text-strong);
    font-size: 0.85rem;
}

.btn-challenge {
    background: var(--tier-gold);
    color: var(--text-on-gold);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-challenge:hover {
    background: var(--warning-light);
    transform: scale(1.05);
}

.btn-challenge-login {
    background: var(--overlay-medium);
    color: white;
    border: 2px solid var(--overlay-strong);
    padding: 0.625rem 1.25rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-challenge-login:hover {
    background: var(--overlay-strong);
    border-color: white;
}

/* Setup Divider */
.setup-divider {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.setup-divider::before,
.setup-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.setup-divider span {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ========== 챌린지 모달 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-heavy);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.challenge-modal {
    background: var(--card-bg);
    border-radius: 1.5rem;
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.challenge-modal-header {
    background: var(--gradient-client);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.challenge-modal-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.challenge-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.challenge-modal-body {
    padding: 1.5rem;
}

.challenge-rules, .challenge-scoring {
    margin-bottom: 1.25rem;
}

.challenge-rules h3, .challenge-scoring h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.challenge-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.challenge-rules li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.challenge-rules li:last-child {
    border-bottom: none;
}

.challenge-rules .rule-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

.scoring-table {
    background: var(--bg-elevated);
    border-radius: 0.75rem;
    overflow: hidden;
}

.score-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.score-row:last-child {
    border-bottom: none;
}

.score-row.total {
    background: var(--gradient-client);
    color: white;
}

.score-row.total strong {
    color: var(--tier-gold);
}

.challenge-modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
}

.challenge-modal-footer .btn-cancel {
    flex: 1;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.challenge-modal-footer .btn-cancel:hover {
    border-color: var(--text-secondary);
}

.challenge-modal-footer .btn-start-challenge {
    flex: 2;
    padding: 0.875rem;
    border: none;
    border-radius: 0.75rem;
    background: var(--gradient-client);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.challenge-modal-footer .btn-start-challenge:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-primary);
}

/* Setup Main Layout */
.setup-main {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.setup-card {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

/* Setup Steps */
.setup-step h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.setup-step .form-group {
    margin-bottom: 1.5rem;
}

.setup-step .form-group > label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* Player Count Selector */
.player-count-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.count-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.2s;
}

.count-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.player-count-selector span {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 3rem;
    text-align: center;
}

/* Round Options */
.round-options {
    display: flex;
    gap: 0.75rem;
}

.round-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--bg-surface);
    transition: all 0.2s;
}

.round-btn:hover {
    border-color: var(--primary-color);
}

.round-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.round-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-muted);
    border-color: var(--border-color);
    color: var(--text-muted);
}

.round-btn.disabled:hover {
    border-color: var(--border-color);
    transform: none;
}

/* Round Input Group */
.round-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.round-adjust-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.round-adjust-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.round-input {
    width: 5rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
}

.round-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Hide number input spinners */
.round-input::-webkit-outer-spin-button,
.round-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.round-input[type=number] {
    -moz-appearance: textfield;
}

/* Round Presets */
.round-presets {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.preset-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--bg-surface);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.preset-btn:hover:not(.disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.preset-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.preset-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-muted);
    border-color: var(--border-color);
    color: var(--text-muted);
}

/* Ranking Notice */
.ranking-notice {
    background: var(--ranked-gradient);
    border: 2px solid var(--tier-gold);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-top: 0.5rem;
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.notice-icon {
    font-size: 1.25rem;
}

.notice-title {
    font-weight: 700;
    color: var(--amber-text);
    font-size: 0.9375rem;
}

.notice-conditions {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.condition {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--warning-dark);
    padding: 0.5rem 0.75rem;
    background: var(--overlay-white-medium);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.condition-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.condition.met {
    background: var(--status-success-bg);
    color: var(--success-dark);
}

.condition.met .condition-icon {
    color: var(--success);
}

.condition.unmet {
    background: var(--overlay-white-medium);
    color: var(--warning-dark);
}

.condition.unmet .condition-icon {
    color: var(--text-muted);
}

.condition.disabled {
    background: var(--bg-muted);
    color: var(--text-muted);
    opacity: 0.6;
}

.condition.disabled .condition-icon {
    color: var(--text-muted);
}

.notice-result {
    text-align: center;
    font-weight: 600;
    padding: 0.625rem;
    border-radius: 0.5rem;
    margin: 0;
    font-size: 0.875rem;
}

.notice-result.success {
    background: var(--success);
    color: white;
}

.notice-result.warning {
    background: var(--status-danger-bg);
    color: var(--danger-dark);
}

/* Song Count Info */
.song-count-info {
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Mode Options */
.mode-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Mode Group */
.mode-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mode-group-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.25rem;
}

/* Mode Select */
.mode-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.mode-selection-area {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mode-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-option:hover {
    border-color: var(--primary-color);
}

.mode-option input {
    margin-top: 0.25rem;
}

.mode-option input:checked + .mode-label {
    color: var(--primary-color);
}

.mode-label {
    display: flex;
    flex-direction: column;
}

.mode-label strong {
    font-size: 1rem;
}

.mode-label small {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Per-Round Selection Options (Radio Box Style) */
.per-round-options {
    display: flex;
    gap: 0.5rem;
}

.per-round-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-surface);
}

.per-round-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.per-round-option input {
    display: none;
}

.per-round-option input:checked + .per-round-label {
    color: white;
}

.per-round-option:has(input:checked) {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.per-round-label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: color 0.2s;
}

.per-round-desc {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* Artist Type Options */
.artist-type-options {
    display: flex;
    gap: 0.75rem;
}

.type-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.type-option:hover {
    border-color: var(--primary-color);
}

.type-option input:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Year Range */
.year-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.year-range input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    text-align: center;
}

.year-range span {
    color: var(--text-secondary);
}

/* Genre Select */
.genre-select select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

/* Artist Select */
.artist-select {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.artist-search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.artist-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.artist-list-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--bg-surface);
}

.artist-list-select option {
    padding: 0.5rem;
}

.artist-list-select option:checked {
    background: var(--primary-color);
    color: white;
}

/* Checkbox / Toggle Option */
.checkbox-option {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.toggle-option input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.toggle-option .toggle-label {
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-option input:checked + .toggle-label {
    color: var(--primary-color);
}

/* Players Input */
.players-input {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.player-input-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-input-item label {
    min-width: 80px;
    font-weight: 500;
    color: var(--text-secondary);
}

.player-input-item input {
    flex: 1;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.player-input-item input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Nickname Input */
.nickname-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.nickname-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Step Buttons */
.step-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.btn-back {
    padding: 1rem 2rem;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border-radius: 0.75rem;
    font-weight: 600;
}

.btn-next, .btn-start {
    padding: 1rem 3rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
}

/* Start button centered when standalone (outside step-buttons) */
.setup-card > .btn-start {
    display: block;
    margin: 2rem auto 0;
}

.btn-next:hover, .btn-start:hover {
    background: var(--primary-hover);
}

/* Multi-Select Chips */
.multi-select-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 180px;
    overflow-y: auto;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-elevated);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-surface);
    color: var(--text-primary);
    user-select: none;
}

.chip:hover {
    border-color: var(--primary-color);
}

.chip.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.chip.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg-muted);
}

.chip.disabled:hover {
    border-color: var(--border-color);
}

.chip.hidden {
    display: none;
}

.chip .chip-count {
    margin-left: 0.25rem;
    font-size: 0.6875rem;
    opacity: 0.7;
}

.chips-loading {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.filter-count-info {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary-color);
}

.filter-search-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.filter-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Mobile Artist Type (모바일에서만 표시) */
.mobile-artist-type {
    display: none !important;
}

/* Mobile Artist Type Section (모바일에서만 표시) */
.mobile-artist-type-section {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    /* '게임 설정', '게임 모드' 텍스트 숨김 */
    .setup-step > h2,
    .setup-step .form-group:has(.mode-options) > label {
        display: none;
    }

    /* 호스트 설정: 인원 + 라운드 + 아티스트유형 한 줄 배치 */
    .host-settings-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .host-settings-row .form-group {
        margin-bottom: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .host-settings-row .form-group > label {
        font-size: 0.8rem;
        margin-bottom: 0;
        white-space: nowrap;
        position: relative;
    }

    /* (최대 N) - 라벨 아래 중앙 표시 */
    .host-settings-row .form-group > label {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .host-settings-row .song-count-info {
        position: static;
        display: block;
        font-size: 0.625rem;
        white-space: nowrap;
        opacity: 0.8;
        margin-top: 0.125rem;
        text-align: center;
    }

    .host-settings-row .round-input-group {
        margin-bottom: 0;
    }

    /* 모바일: +/- 버튼 숨김 */
    .host-settings-row .round-adjust-btn {
        display: none;
    }

    /* 모바일: 인풋 필드 스타일 조정 */
    .host-settings-row .round-input {
        width: 3rem;
        text-align: center;
    }

    /* 프리셋 버튼 숨김 */
    .host-settings-row .round-presets {
        display: none;
    }

    /* 아티스트 유형 영역 숨김 (모바일) - 기존 select 및 PC용 radio */
    .mobile-artist-type,
    #artistTypeArea {
        display: none !important;
    }

    /* 모바일 아티스트 유형 - 매 라운드 선택 아래 표시 */
    .mobile-artist-type-section {
        display: block !important;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .mobile-artist-type-section label {
        display: block;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--text-secondary);
        margin-bottom: 0.5rem;
    }

    .mobile-artist-type-buttons {
        display: flex;
        gap: 0.5rem;
    }

    .mobile-artist-type-buttons .type-btn {
        flex: 1;
        padding: 0.625rem 0.75rem;
        border: 2px solid var(--border-color);
        border-radius: 0.5rem;
        background: var(--bg-surface);
        color: var(--text-primary);
        font-size: 0.875rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        text-align: center;
    }

    .mobile-artist-type-buttons .type-btn.active {
        border-color: var(--primary-color);
        background: var(--primary-light);
        color: var(--primary-color);
    }

    /* 내가맞추기 페이지용 모바일 스타일 - 라운드 + 아티스트 유형 한 줄 배치 */
    #roundSettingArea:not(.host-settings-row #roundSettingArea) {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: center;
        gap: 0.75rem;
    }

    /* 라운드 설정 컨테이너 */
    #roundSettingArea:not(.host-settings-row #roundSettingArea) > label {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 0;
        font-size: 0.8rem;
    }

    #roundSettingArea:not(.host-settings-row #roundSettingArea) .song-count-info {
        display: block;
        font-size: 0.65rem;
        margin-top: 0.125rem;
        margin-left: 0;
        text-align: center;
    }

    #roundSettingArea:not(.host-settings-row #roundSettingArea) .round-input-group {
        margin-bottom: 0;
    }

    /* +/- 버튼 숨기기 */
    #roundSettingArea:not(.host-settings-row #roundSettingArea) .round-adjust-btn {
        display: none;
    }

    /* 라운드 입력 크기 줄이기 */
    #roundSettingArea:not(.host-settings-row #roundSettingArea) .round-input {
        width: 2.75rem;
        padding: 0.25rem;
        font-size: 1rem;
    }

    #roundSettingArea:not(.host-settings-row #roundSettingArea) .round-presets {
        display: none;
    }

    /* 모바일 아티스트 유형 select 표시 */
    #roundSettingArea:not(.host-settings-row #roundSettingArea) .mobile-artist-type {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    #roundSettingArea:not(.host-settings-row #roundSettingArea) .mobile-artist-type label {
        font-size: 0.8rem;
        font-weight: 600;
        margin-bottom: 0;
    }

    #roundSettingArea:not(.host-settings-row #roundSettingArea) .mobile-artist-type .mode-select {
        width: auto;
        min-width: 4.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.85rem;
    }

    /* Challenge Shortcut Mobile */
    .challenge-shortcut {
        padding: 0.875rem;
        border-radius: 0.75rem;
        margin-bottom: 1rem;
    }

    .challenge-shortcut-content {
        gap: 0.75rem;
    }

    .challenge-shortcut .challenge-icon {
        font-size: 1.5rem;
    }

    .challenge-shortcut .challenge-info strong {
        font-size: 0.95rem;
    }

    .challenge-shortcut .challenge-info span {
        font-size: 0.75rem;
    }

    .btn-challenge {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .btn-challenge-login {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .setup-divider {
        margin-bottom: 1rem;
    }

    .setup-divider span {
        font-size: 0.75rem;
    }

    /* Challenge Modal Mobile */
    .challenge-modal {
        border-radius: 1rem;
    }

    .challenge-modal-header {
        padding: 1rem;
    }

    .challenge-modal-icon {
        font-size: 2.5rem;
    }

    .challenge-modal-header h2 {
        font-size: 1.25rem;
    }

    .challenge-modal-body {
        padding: 1rem;
    }

    .challenge-rules h3, .challenge-scoring h3 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .challenge-rules li {
        padding: 0.5rem 0;
        font-size: 0.8rem;
    }

    .challenge-rules .rule-icon {
        font-size: 1rem;
    }

    .score-row {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }

    .challenge-modal-footer {
        padding: 0.75rem 1rem 1rem;
        gap: 0.5rem;
    }

    .challenge-modal-footer .btn-cancel,
    .challenge-modal-footer .btn-start-challenge {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .setup-main {
        padding: 0.25rem 0;
    }

    .setup-card {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .setup-step h2 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .setup-step .form-group {
        margin-bottom: 0.75rem;
    }

    .setup-step .form-group > label {
        margin-bottom: 0.375rem;
        font-size: 0.85rem;
    }

    /* Nickname Input Mobile */
    .nickname-input {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }

    .player-count-selector {
        gap: 1rem;
    }

    .count-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    .player-count-selector span {
        font-size: 2rem;
    }

    .round-options {
        gap: 0.5rem;
    }

    .round-btn {
        padding: 0.75rem 0.5rem;
        font-size: 1rem;
    }

    /* Game Mode Grid - 2 columns */
    .mode-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.375rem;
    }

    .mode-group-label {
        grid-column: 1 / -1;
        font-size: 0.7rem;
        padding: 0.125rem 0;
        margin-bottom: 0.125rem;
    }

    .mode-option {
        padding: 0.5rem;
        gap: 0.375rem;
        border-radius: 0.5rem;
    }

    .mode-option input {
        margin-top: 0.125rem;
        width: 14px;
        height: 14px;
    }

    .mode-label strong {
        font-size: 0.8rem;
    }

    .mode-label small {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    /* 게임 모드 2x2 그리드 */
    .mode-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    /* Per-Round Options Mobile */
    .per-round-options {
        gap: 0.375rem;
    }

    .per-round-option {
        padding: 0.5rem 0.5rem;
        border-radius: 0.5rem;
    }

    .per-round-label {
        font-size: 0.8rem;
    }

    .per-round-desc {
        font-size: 0.7rem;
        margin-top: 0.25rem;
    }

    /* Artist Type Options Mobile - horizontal compact */
    .artist-type-options {
        gap: 0.375rem;
    }

    .type-option {
        padding: 0.5rem 0.25rem;
        gap: 0.25rem;
        border-radius: 0.5rem;
        font-size: 0.8rem;
    }

    .type-option input {
        width: 14px;
        height: 14px;
    }

    .step-buttons {
        margin-top: 1rem;
        justify-content: center;
    }

    .btn-back {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .btn-next, .btn-start {
        padding: 0.625rem 2rem;
        font-size: 0.9rem;
    }

    .setup-card > .btn-start {
        margin: 1rem auto 0;
    }

    /* Round Input Group Mobile */
    .round-input-group {
        gap: 0.5rem;
        margin-bottom: 0.375rem;
    }

    .round-adjust-btn {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.9rem;
    }

    .round-input {
        width: 3.5rem;
        padding: 0.375rem;
        font-size: 1.125rem;
    }

    .round-presets {
        gap: 0.25rem;
    }

    .preset-btn {
        padding: 0.25rem 0.625rem;
        font-size: 0.7rem;
    }

    /* Ranking Notice Mobile - 2 column grid */
    .ranking-notice {
        padding: 0.75rem;
        border-radius: 0.5rem;
        margin-top: 0.25rem;
    }

    .notice-header {
        margin-bottom: 0.375rem;
    }

    .notice-icon {
        font-size: 0.9rem;
    }

    .notice-title {
        font-size: 0.8rem;
    }

    .notice-conditions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.25rem;
        margin-bottom: 0.375rem;
    }

    .condition {
        padding: 0.25rem 0.375rem;
        font-size: 0.7rem;
        border-radius: 0.375rem;
    }

    .condition-icon {
        width: 0.875rem;
        height: 0.875rem;
        font-size: 0.7rem;
    }

    .notice-result {
        padding: 0.375rem;
        font-size: 0.75rem;
    }

    /* Multi-Select Chips Mobile */
    .multi-select-chips {
        max-height: 120px;
        padding: 0.375rem;
        gap: 0.25rem;
    }

    .chip {
        padding: 0.1875rem 0.375rem;
        font-size: 0.7rem;
        border-radius: 0.75rem;
    }

    .chip .chip-count {
        font-size: 0.6rem;
    }

    .filter-search-input {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
        margin-bottom: 0.375rem;
    }

    .filter-count-info {
        font-size: 0.75rem;
    }

    /* Mode Selection Area Mobile */
    .mode-selection-area {
        margin-top: -0.25rem;
    }

    .mode-select {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    /* Toggle Option Mobile */
    .toggle-option {
        padding: 0.625rem 0.75rem;
        gap: 0.5rem;
    }

    .toggle-option input[type="checkbox"] {
        width: 1rem;
        height: 1rem;
    }

    .toggle-label {
        font-size: 0.85rem;
    }
}

/* ========== 다크 테마 지원 ========== */
[data-theme="dark"] .setup-card {
    background: var(--bg-surface);
}

[data-theme="dark"] .round-btn {
    background: var(--bg-surface);
    color: var(--text-primary);
}

[data-theme="dark"] .round-btn:hover {
    border-color: var(--primary-color);
}

[data-theme="dark"] .round-btn.disabled {
    background: var(--bg-muted);
    border-color: var(--border-color);
    color: var(--text-muted);
}

[data-theme="dark"] .preset-btn {
    background: var(--bg-surface);
}

[data-theme="dark"] .preset-btn.disabled {
    background: var(--bg-muted);
    border-color: var(--border-color);
    color: var(--text-muted);
}

[data-theme="dark"] .toggle-option {
    background: var(--bg-elevated);
}

[data-theme="dark"] .toggle-option:hover {
    background: var(--bg-muted);
}

[data-theme="dark"] .artist-list-select {
    background: var(--bg-surface);
    color: var(--text-primary);
}

[data-theme="dark"] .chip {
    background: var(--bg-surface);
    color: var(--text-primary);
}

[data-theme="dark"] .per-round-option {
    background: var(--bg-surface);
}

[data-theme="dark"] .per-round-option:hover {
    background: var(--bg-muted);
}

[data-theme="dark"] .per-round-option:has(input:checked) {
    background: var(--primary-color);
}

[data-theme="dark"] .multi-select-chips {
    background: var(--bg-elevated);
}

[data-theme="dark"] .challenge-modal {
    background: var(--bg-surface);
}

[data-theme="dark"] .challenge-modal-body {
    color: var(--text-primary);
}

[data-theme="dark"] .challenge-rules li {
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .scoring-table {
    background: var(--bg-elevated);
}

[data-theme="dark"] .score-row {
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .challenge-modal-footer .btn-cancel {
    background: var(--bg-elevated);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .btn-back {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

[data-theme="dark"] .year-range input {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .genre-select select {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .mode-select {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .artist-search-input {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .filter-search-input {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .player-input-item input {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .nickname-input {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .round-input {
    background: var(--bg-surface);
    color: var(--primary-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .ranking-notice {
    background: var(--gradient-warning);
    border-color: var(--warning);
}

[data-theme="dark"] .notice-title {
    color: var(--warning-light);
}

[data-theme="dark"] .condition {
    color: var(--warning-light);
    background: var(--overlay-black-light);
}

[data-theme="dark"] .condition.met {
    background: var(--status-success-bg-hover);
    color: var(--success-light);
}

[data-theme="dark"] .condition.unmet {
    background: var(--overlay-black-light);
    color: var(--warning-light);
}

/* 480px 이하 - 플레이어 입력 화면 한눈에 보이게 */
@media (max-width: 480px) {
    .setup-main {
        padding: 0;
    }

    .setup-card {
        padding: 0.75rem;
        border-radius: 0.5rem;
    }

    /* Step 2 플레이어 입력 더 컴팩트하게 */
    .setup-step h2 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .players-input {
        gap: 0.5rem;
        max-height: none;
    }

    .player-input-item {
        gap: 0.5rem;
    }

    .player-input-item label {
        min-width: 60px;
        font-size: 0.8rem;
    }

    .player-input-item input {
        padding: 0.5rem 0.625rem;
        font-size: 0.85rem;
        border-radius: 0.5rem;
    }

    .step-buttons {
        margin-top: 0.75rem;
        gap: 0.5rem;
    }

    .btn-back {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 0.5rem;
    }

    .btn-next, .btn-start {
        padding: 0.5rem 1.5rem;
        font-size: 0.8rem;
        border-radius: 0.5rem;
    }
}
