/**
 * 题库手机号登录 - 样式
 */

/* Modal Overlay */
.qb-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.qb-modal-overlay.active {
    display: flex;
}

/* Modal Container */
.qb-modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: qbModalIn 0.3s ease;
    overflow: hidden;
}

@keyframes qbModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header */
.qb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #2F6B5E, #1a4a3e);
    color: #fff;
}

.qb-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.qb-modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.qb-modal-close:hover {
    opacity: 1;
}

/* Modal Body */
.qb-modal-body {
    padding: 24px;
}

.qb-modal-desc {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 20px;
    text-align: center;
}

/* Form Groups */
.qb-form-group {
    margin-bottom: 16px;
}

.qb-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.qb-form-group input[type="tel"],
.qb-form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.qb-form-group input:focus {
    outline: none;
    border-color: #2F6B5E;
}

/* Code Row */
.qb-code-row {
    display: flex;
    gap: 12px;
}

.qb-code-row input {
    flex: 1;
}

.qb-code-row button {
    white-space: nowrap;
    padding: 12px 20px;
    background: #2F6B5E;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.qb-code-row button:hover:not(:disabled) {
    background: #1a4a3e;
}

.qb-code-row button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Verify Button */
.qb-verify-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2F6B5E, #1a4a3e);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.qb-verify-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 107, 94, 0.4);
}

.qb-verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error/Success Messages */
.qb-login-error {
    display: none;
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.qb-login-success {
    display: none;
    background: #dcfce7;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Nav Button Styles */
#qb-login-btn,
#qb-logout-btn {
    transition: all 0.2s;
}

#qb-login-btn:hover {
    background: #1a4a3e !important;
}

#qb-logout-btn:hover {
    background: #666 !important;
}

/* Responsive */
@media (max-width: 600px) {
    .qb-modal {
        width: 95%;
        margin: 20px;
    }
    
    .qb-modal-body {
        padding: 20px;
    }
    
    .qb-code-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .qb-code-row button {
        width: 100%;
    }
}
