* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
}

.auth-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.username-check-result {
    margin-top: 5px;
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 3px;
    display: none;
}

.username-check-result.check-loading {
    display: block;
    background-color: #f0f0f0;
    color: #666;
}

.username-check-result.check-success {
    display: block;
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.username-check-result.check-error {
    display: block;
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.check-icon {
    font-weight: bold;
    margin-right: 5px;
}

.check-loading-text {
    font-style: italic;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.form-footer {
    margin-top: 20px;
    text-align: center;
    color: #666;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.home-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
}

.home-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px;
}

.home-box h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.user-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.user-info p {
    margin-bottom: 10px;
    color: #555;
    font-size: 16px;
}

.user-info p:last-child {
    margin-bottom: 0;
}

.actions {
    text-align: center;
}

/* Dialog 样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

.dialog-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: dialogFadeIn 0.3s ease-out;
}

@keyframes dialogFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dialog-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dialog-title {
    margin: 0;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.dialog-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.dialog-content {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.dialog-content p {
    margin-bottom: 10px;
}

.dialog-content p:last-child {
    margin-bottom: 0;
}

.dialog-countdown {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-top: 20px;
}

.dialog-countdown p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.dialog-countdown #countdown {
    color: #667eea;
    font-weight: bold;
    font-size: 18px;
}

.dialog-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    text-align: center;
    background: #f8f9fa;
}

.dialog-footer .btn {
    min-width: 120px;
    padding: 12px 30px;
}
