/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #7ed6df;
    --accent-color: #32d3a6;
    --text-color: #333;
    --light-gray: #f5f7fa;
    --border-color: #e1e5eb;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 导航栏 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-3px);
}

.logo-img {
    height: 40px;
    width: auto;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo:hover .logo-img {
    transform: rotate(5deg) scale(1.1);
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.15));
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.logo:hover .logo-text {
    color: var(--accent-color);
    text-shadow: 0 5px 15px rgba(50, 211, 166, 0.3);
}

.logo-text::after {
    content: '工单系统';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.5s ease;
}

.logo:hover .logo-text::after {
    clip-path: inset(0 0 0 0);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a7bc8;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-accent {
    background-color: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background-color: #2bb992;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(50, 211, 166, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--light-gray);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.1);
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* 首页英雄区域 */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    border-radius: 0 0 30px 30px;
    margin-bottom: 50px;
    animation: fadeInUp 1s ease;
}

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

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    animation: fadeIn 1s ease 0.3s both;
}

.hero p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: fadeIn 1s ease 0.5s both;
}

/* 功能卡片区 */
.features {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: transform 0.5s ease, color 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: rotate(15deg) scale(1.2);
    color: var(--accent-color);
}

/* 页脚 */
.footer {
    background-color: white;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.8s ease;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links a:hover::after {
    width: 100%;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    animation: fadeIn 0.8s ease;
}

.table th, .table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.table th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--text-color);
}

.table tr:hover {
    background-color: #f9f9f9;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.status-pending {
    background-color: #ffeaa7;
    color: #e17055;
}

.status-in_progress {
    background-color: #a29bfe;
    color: white;
}

.status-resolved {
    background-color: #55efc4;
    color: #00b894;
}

.status-closed {
    background-color: #dfe6e9;
    color: #636e72;
}

/* 优先级标签 */
.priority-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.priority-low {
    background-color: #d1ecf1;
    color: #0c5460;
}

.priority-medium {
    background-color: #fff3cd;
    color: #856404;
}

.priority-high {
    background-color: #f8d7da;
    color: #721c24;
}

.priority-urgent {
    background-color: #f5c6cb;
    color: #721c24;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    /* 移动端优化 */
    .hero {
        padding: 60px 0;
        border-radius: 0 0 20px 20px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    .table th, .table td {
        padding: 10px;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 14px;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .logo-text {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .logo-img {
        height: 30px;
    }
    
    .logo-text {
        font-size: 18px;
    }
}

/* 移动端隐藏元素 */
@media (max-width: 992px) {
    .desktop-only {
        display: none !important;
    }
}

/* 电脑端隐藏元素 */
@media (min-width: 993px) {
    .mobile-only {
        display: none !important;
    }
}

/* ============================================
   以下是新增的服务条款和隐私政策页面样式
   ============================================ */

/* 内容卡片样式 */
.content-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    line-height: 1.8;
}

.content-card h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.content-card h2 {
    color: var(--text-color);
    margin: 30px 0 15px;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
}

.content-card h3 {
    color: #555;
    margin: 20px 0 10px;
}

.content-card p {
    margin-bottom: 15px;
    color: #555;
}

.content-card ul, .content-card ol {
    margin: 15px 0;
    padding-left: 30px;
}

.content-card li {
    margin-bottom: 10px;
    color: #555;
}

/* 重要提示框 */
.important {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

/* 隐私高亮框 */
.privacy-highlight {
    background-color: #e8f4ff;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 15px 0;
    border-left: 3px solid var(--primary-color);
}

/* 返回链接 */
.back-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.data-table th, .data-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.data-table th {
    background-color: #f5f7fa;
    font-weight: 600;
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 更新日期 */
.update-date {
    text-align: right;
    color: #888;
    font-size: 14px;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* 条款编号 */
.term-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 10px;
    font-weight: bold;
}

/* 隐私图标 */
.privacy-icon {
    color: var(--primary-color);
    margin-right: 10px;
}

/* 打印样式 */
@media print {
    .navbar, .footer, .back-link, button {
        display: none !important;
    }
    
    .content-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .content-card h1 {
        color: #000 !important;
    }
    
    .privacy-highlight {
        background-color: #f0f0f0 !important;
    }
}

/* 响应式设计 - 服务条款和隐私政策页面 */
@media (max-width: 768px) {
    .content-card {
        padding: 20px;
        margin: 0;
    }
    
    .content-card h1 {
        font-size: 24px;
    }
    
    .content-card h2 {
        font-size: 20px;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

@media (min-width: 769px) {
    .content-card {
        max-width: 1000px;
        margin: 30px auto;
    }
}

/* 消息提示样式 */
.message-box {
    display: none;
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.message-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* 验证码发送按钮样式 */
#sendCodeBtn.sending {
    background-color: #ccc !important;
    cursor: not-allowed;
}

/* 注册页面特定样式 */
@media (max-width: 768px) {
    #sendCodeBtn {
        white-space: nowrap;
        font-size: 0.9rem;
        min-width: 100px;
    }
}