/* 首页样式 - 联通流量查询系统 */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tab-container {
    max-width: 550px;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.tab-header {
    display: flex;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
}

.tab-button {
    flex: 1;
    padding: 18px 24px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    color: #475569;
    background: rgba(255, 255, 255, 0.8);
}

.tab-button.active {
    color: #6366f1;
    background: white;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    padding: 36px 32px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #cbd5e1;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-group textarea {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-primary:disabled {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.info-text {
    margin-top: 24px;
    padding: 14px 16px;
    background: linear-gradient(to right, #eff6ff, #e0f2fe);
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.6;
}

.info-text strong {
    color: #1e3a8a;
}

.result-box {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(to bottom, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
    border-radius: 12px;
    display: none;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-box.show {
    display: block;
}

.result-box h3 {
    margin: 0 0 16px 0;
    color: #065f46;
    font-size: 18px;
}

.result-box p {
    color: #047857;
    margin: 0 0 12px 0;
    font-size: 14px;
}

.result-link {
    display: block;
    padding: 14px 16px;
    background: white;
    border: 2px solid #86efac;
    border-radius: 8px;
    margin: 12px 0;
    word-break: break-all;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #059669;
    line-height: 1.6;
}

.btn-copy {
    margin-top: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-goto {
    margin-left: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-goto:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.error-message {
    margin-top: 20px;
    padding: 14px 16px;
    background: linear-gradient(to right, #fee2e2, #fecaca);
    border: 2px solid #fca5a5;
    border-radius: 8px;
    color: #991b1b;
    display: none;
    font-size: 14px;
    line-height: 1.6;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message.show {
    display: block;
}

.page-title {
    margin-top: 0;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 22px;
    font-weight: 700;
}

.page-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 28px;
    line-height: 1.6;
}

.warning-box {
    background: linear-gradient(to right, #fef2f2, #fee2e2);
    border: 2px solid #fca5a5;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
}

.warning-box p:first-child {
    color: #dc2626;
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 15px;
}

.warning-box p:last-child {
    color: #991b1b;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* 移动端适配 */
@media (max-width: 640px) {
    body {
        padding: 16px;
    }
    
    .tab-container {
        border-radius: 12px;
    }
    
    .tab-content {
        padding: 24px 20px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .btn-copy,
    .btn-goto {
        padding: 9px 16px;
        font-size: 13px;
    }
}
