* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.auth-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 28px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    text-align: center;
}

.auth-box h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 8px;
}

.auth-box p {
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
}

#main-app {
    padding: 20px 0;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 24px;
    color: #fff;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

h2 {
    margin-bottom: 16px;
    font-size: 18px;
    color: #444;
    border-bottom: 2px solid #ff6700;
    padding-bottom: 8px;
}

.hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.panel {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    background: #fafafa;
}

input:focus, select:focus {
    outline: none;
    border-color: #ff6700;
    background: #fff;
}

input.readonly {
    background: #f0f0f0;
    color: #ff6700;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    color: #666;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.row {
    display: flex;
    gap: 12px;
}

.col {
    flex: 1;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6700, #ff8533);
    color: #fff;
    width: 100%;
    box-shadow: 0 4px 12px rgba(255, 103, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 103, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
    width: 100%;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-refresh {
    background: #e3f2fd;
    color: #1565c0;
    width: 100%;
    margin-top: 8px;
    font-size: 14px;
    padding: 8px;
}

.btn-refresh:hover {
    background: #bbdefb;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #555;
}

.info-card p {
    margin-bottom: 6px;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-card strong {
    color: #333;
}

.status {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    display: none;
    word-break: break-all;
    line-height: 1.5;
}

.status.show {
    display: block;
}

.status.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.status.info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.footer {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    margin-top: 8px;
}

@media (max-width: 520px) {
    .container {
        padding: 12px;
    }
    .panel {
        padding: 20px;
    }
    h1 {
        font-size: 20px;
    }
}
