/* ============ 登录页面 ============ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse at center, #1e293b 0%, #0f172a 100%);
}

.login-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.game-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 8px;
}

.game-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form input {
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 16px;
    transition: border-color 0.2s;
}

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

/* ============ 当前房间状态警示 ============ */
.current-room-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    margin-left: auto;
    /* 推到右邊 */
}

.current-room-alert #current-room-message {
    color: #fbbf24;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* 使用更具體的選擇器覆蓋 base.css 的 .btn */
button.btn-danger-sm {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 6px 12px !important;
    /* 強制覆蓋 .btn padding */
    border-radius: 6px;
    font-size: 12px !important;
    /* 強制覆蓋 .btn font-size */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    min-height: auto;
}

button.btn-danger-sm:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

button.btn-danger-sm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}



/* 保留原本的大尺寸版本備用 */
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    display: none;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-top: 16px;
}

.players-waiting {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.players-waiting h3 {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.players-waiting ul {
    list-style: none;
}

.players-waiting li {
    padding: 8px 12px;
    background: var(--bg-dark);
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.players-waiting li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
}

.player-offline::before {
    background: var(--text-secondary) !important;
}

.waiting-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* ============ 社区链接 ============ */
.community-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.community-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.community-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #0088cc;
    transform: translateY(-2px);
}

.telegram-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #0088cc;
}

/* Small Primary Button - Added at the end to ensure priority */
/* Small Success Button - Added at the end to ensure priority */
.btn-success-sm {
    background: #10b981;
    /* Fallback */
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white !important;
    border: none;
    padding: 6px 12px !important;
    border-radius: 6px;
    font-size: 12px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap !important;
    line-height: 1 !important;
    min-height: unset !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: auto !important;
}

.btn-success-sm:hover {
    background: #059669;
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    color: white !important;
}