/* index.php 전용 CSS */

.grid-center { position: relative; z-index: 10; }

.user-info b { color: var(--orange); }
.online-count { font-size: 0.85rem; color: #888; }

/* 매칭 섹션 */
.match-section {
    background: transparent; padding: 30px 10px; margin-bottom: 20px;
    min-height: 160px; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    transition: all 0.3s ease; width: 100%;
}
.match-section.searching { background: rgba(243,156,18,0.05); border: 2px dashed var(--orange); border-radius: 20px; }
.btn-match-start {
    background: var(--orange); color: white; border: none;
    padding: 20px 50px; border-radius: 5px; font-size: 1.4rem;
    font-weight: bold; cursor: pointer; transition: 0.2s;
    width: 100%; max-width: 400px;
}
.btn-match-start:hover { filter: brightness(1.1); }
.btn-match-start.locked { background: #7f8c8d; cursor: not-allowed; opacity: 0.7; }

#search-ui { display: none; flex-direction: column; align-items: center; width: 100%; }
.match-section.searching #start-ui  { display: none; }
.match-section.searching #search-ui { display: flex; }

.spinner {
    width: 40px; height: 40px;
    border: 4px solid rgba(0,0,0,0.05); border-top-color: var(--orange);
    border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.btn-cancel-match {
    margin-top: 20px; background: #e74c3c; border: none;
    color: #fff; cursor: pointer; font-size: 1rem; font-weight: bold;
    padding: 12px 30px; border-radius: 6px; text-decoration: none;
}
.btn-cancel-match:hover { background: #c0392b; }

/* 온보딩 */
.onboarding-info { padding: 20px 0; margin-bottom: 25px; text-align: left; width: 100%; box-sizing: border-box; }
.onboarding-info .title { color: #000000; font-weight: bold; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.onboarding-list { list-style: none; padding: 0; margin: 0; }
.onboarding-list li { margin-bottom: 10px; color: #000000; display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.onboarding-list li.done { color: #ffffff; text-decoration: line-through; opacity: 0.7; }
.onboarding-list li .check { display: inline-block; width: 18px; height: 18px; border: 1px solid #555; border-radius: 3px; text-align: center; line-height: 18px; font-size: 12px; }
.onboarding-list li.done .check { background: #2ecc71; border-color: #2ecc71; color: white; }
.onboarding-list li.done .check::after { content: "✓"; }

/* 로그인/회원가입 패널 */
#register-panel input, #register-panel select { color: #fff !important; }
#register-panel input::placeholder { color: rgba(255,255,255,0.5); }
#login-panel input, #login-panel select { color: #fff !important; }
#login-panel input::placeholder { color: rgba(255,255,255,0.5); }
#register-panel input:focus, #register-panel select:focus,
#login-panel input:focus, #login-panel select:focus,
#settings-panel a:focus { outline: none; }

/* 언어 선택 드롭다운 */
.lp-lang-picker { position: relative; width: 100%; }
.lp-lang-trigger { width: 100%; display: flex; align-items: center; gap: 8px; background: #3a3a3a; border: 1px solid #555; color: #eee !important; padding: 10px; border-radius: 6px; font-size: 0.9rem; cursor: pointer; text-align: left; }
.lp-lang-trigger span { color: #eee !important; }
.lp-lang-trigger:hover { background: #444; }
.lp-lang-trigger .arrow { margin-left: auto; opacity: 0.6; font-size: 0.75rem; }
.lp-lang-menu { display: none; position: absolute; z-index: 999; width: 100%; background: #2c2c2c; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; max-height: 220px; overflow-y: auto; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.lp-lang-picker.open .lp-lang-menu { display: block; }
.lp-lang-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 0.88rem; color: #eee !important; background: #2c2c2c !important; }
.lp-lang-item:hover { background: #3a3a3a !important; }
.lp-lang-item.selected { background: #444 !important; font-weight: bold; }
.lp-lang-item .fi { border-radius: 2px; flex-shrink: 0; }

/* 라이브 매치 목록 */
.live-matches-section { margin-top: 20px; text-align: center; background: transparent; border-radius: 12px; padding: 15px; width: 100%; box-sizing: border-box; }
.live-matches-title { font-size: 1rem; font-weight: bold; color: #fff; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.live-match-item { display: flex; flex-direction: row; gap: 12px; align-items: center; padding: 15px 12px; border: 1px solid #ffffff; border-radius: 8px; margin-bottom: 8px; transition: background 0.2s, border-color 0.2s; }
.live-match-item:last-child { margin-bottom: 0; }
.live-match-item:hover { background: transparent; border-color: #000000; }
.match-info { flex: 1; }
.match-players { font-size: 0.95rem; color: #fff; font-weight: 500; }
.match-players span { color: #fff; font-weight: bold; }
.btn-spectate { background: #f8f9fa; border: 1px solid #ddd; padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; color: #555; text-decoration: none; cursor: pointer; transition: all 0.2s; }
.btn-spectate:hover { background: var(--orange); color: white; border-color: var(--orange); }
.no-matches { padding: 20px; text-align: center; color: #fff; font-size: 0.9rem; }

@media (max-width: 600px) {
    .grid-center, .grid-right { width: 100% !important; padding: 0 4px !important; box-sizing: border-box; }
    .match-section { padding: 20px 0; }
    #login-panel, #register-panel { width: 100% !important; }
    #start-ui { width: 90% !important; margin: 0 auto !important; }
    #start-ui p { white-space: normal; }
    #start-ui p br { display: none; }
    .btn-match-start { padding: 15px 30px; font-size: 1.2rem; }
    .live-matches-section { padding: 12px; }
    .live-match-item { padding: 10px 12px; }
    .match-players { font-size: 0.85rem; }
    .btn-spectate { padding: 5px 10px; font-size: 0.75rem; border-radius: 4px; }
}
