/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b6b;
    --primary-dark: #ee5a5a;
    --secondary: #4ecdc4;
    --accent: #ffe66d;
    --dark: #2d3436;
    --light: #f7f9fc;
    --white: #ffffff;
    --gray: #95a5a6;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #ff7675;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    color: var(--dark);
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* 顶部导航 */
header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px 35px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

nav {
    display: flex;
    gap: 15px;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    padding: 10px 25px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

nav a:hover, nav a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

/* 主卡片 */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 35px;
    margin-bottom: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.card h2 {
    font-size: 22px;
    margin-bottom: 25px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2::before {
    content: '';
    width: 5px;
    height: 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 5px;
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 表单 */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #3db5ac);
    box-shadow: 0 5px 20px rgba(78, 205, 196, 0.3);
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

table tr:hover {
    background: rgba(255, 107, 107, 0.05);
}

/* 状态标签 */
.status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: #d68910;
}

.status-processing {
    background: linear-gradient(135deg, #81ecec, #00cec9);
    color: #008c89;
}

.status-resolved {
    background: linear-gradient(135deg, #55efc4, #00b894);
    color: #008f72;
}

.status-closed {
    background: linear-gradient(135deg, #dfe6e9, #b2bec3);
    color: #636e72;
}

/* 优先级 */
.priority {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.priority-low {
    background: #d1fae5;
    color: #065f46;
}

.priority-normal {
    background: #fef3c7;
    color: #92400e;
}

.priority-high {
    background: #fed7d7;
    color: #c53030;
}

.priority-urgent {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
}

/* 工单详情 */
.ticket-detail {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.ticket-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

.ticket-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray);
}

.meta-value {
    color: var(--dark);
    font-weight: 600;
}

/* 回复列表 */
.replies {
    margin-top: 30px;
}

.reply-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 20px 25px;
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary);
}

.reply-item.admin {
    border-left-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05), rgba(255, 107, 107, 0.02));
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.reply-type {
    font-weight: 700;
    font-size: 14px;
    color: var(--dark);
}

.reply-time {
    font-size: 13px;
    color: var(--gray);
}

.reply-content {
    line-height: 1.8;
    color: var(--dark);
}

/* 提示信息 */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* 登录注册页面 */
.auth-container {
    max-width: 420px;
    margin: 80px auto;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.auth-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 30px;
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 版权 */
footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    font-size: 14px;
    opacity: 0.9;
}

/* 响应式 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .card {
        padding: 20px;
        border-radius: 18px;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        min-width: 100%;
    }

    table {
        font-size: 14px;
    }

    table th, table td {
        padding: 10px 8px;
    }

    .ticket-header {
        flex-direction: column;
        gap: 15px;
    }

    .ticket-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* 动画效果 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideUp 0.6s ease;
}

/* 输入框焦点动画 */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    animation: pulse 1.5s infinite;
}
