/* 顾老师试卷网 - 主要样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

:root {
    --primary: #ff6b6b;
    --secondary: #4ecdc4;
    --yellow: #ffd166;
    --green: #06d6a0;
    --purple: #9d4edd;
    --orange: #ff9e5d;
    --blue: #457bff;
    --light: #f8f9fa;
    --dark: #2d3436;
    --gray: #636e72;
    --border: #e0e0e0;
    --success: #06d6a0;
    --warning: #ffd166;
    --danger: #ef476f;
}

body {
    background: linear-gradient(135deg, #f9f7ff 0%, #f0f9ff 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* 头部样式 */
header {
    background: linear-gradient(135deg, var(--primary) 0%, #ff8e53 100%);
    color: white;
    padding: 1.8rem 0;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.2);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--yellow), var(--green), var(--purple));
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--yellow), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.domain {
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 5px 15px;
    border-radius: 30px;
    margin-left: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wechat-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* 导航按钮 */
.nav-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.nav-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), #ff8e53);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

/* 筛选器样式 */
.filters-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 3px solid white;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 700;
    color: var(--dark);
}

.filter-group select {
    padding: 12px 16px;
    border: 3px solid #f1f3f5;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s;
}

.filter-group select:focus {
    border-color: var(--primary);
    outline: none;
}

.search-box {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    border: 3px solid var(--primary);
    border-radius: 14px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s;
}

.search-box input:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
    outline: none;
}

.stats-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f1f3f5;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.stat-value {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 试卷卡片样式 */
.papers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .papers-grid {
        grid-template-columns: 1fr;
    }
}

.paper-card {
    background: white;
    border-radius: 18px;
    padding: 25px;
    transition: all 0.4s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 3px solid white;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.paper-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    border-color: var(--yellow);
}

.paper-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.paper-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.paper-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.4;
    flex: 1;
}

.paper-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.subject-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
}

.subject-math { 
    background: linear-gradient(135deg, var(--secondary), var(--blue));
    color: white;
}

.subject-chinese { 
    background: linear-gradient(135deg, var(--primary), #ff8e53);
    color: white;
}

.subject-english { 
    background: linear-gradient(135deg, var(--purple), #9d4edd);
    color: white;
}

.subject-physics { 
    background: linear-gradient(135deg, #ff9e5d, #ff7b54);
    color: white;
}

.subject-chemistry { 
    background: linear-gradient(135deg, #06d6a0, #05c592);
    color: white;
}

.subject-biology { 
    background: linear-gradient(135deg, #9d4edd, #8a2be2);
    color: white;
}

.subject-history { 
    background: linear-gradient(135deg, var(--orange), #ff7b54);
    color: white;
}

.subject-geography { 
    background: linear-gradient(135deg, var(--green), #05c592);
    color: white;
}

.subject-politics { 
    background: linear-gradient(135deg, var(--blue), #2c6fd1);
    color: white;
}

.paper-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.meta-tag {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 5px 12px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 2px solid white;
}

.paper-description {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.paper-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.paper-link:hover {
    color: #ff8e53;
}

/* 试卷详情页样式 */
.paper-detail {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    border: 3px solid white;
    position: relative;
    overflow: hidden;
}

.paper-detail::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--purple));
}

.detail-title {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f1f3f5;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-label {
    color: var(--gray);
}

.meta-value {
    color: var(--dark);
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
}

.pan-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.pan-link-item:hover {
    background: white;
    border-color: var(--primary);
}

.pan-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.pan-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

.baidu-badge {
    background: linear-gradient(135deg, #2c6fd1, #1a4a9c);
}

.quark-badge {
    background: linear-gradient(135deg, #ff6b35, #e55a2b);
}

.link-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.open-btn {
    background: linear-gradient(135deg, var(--secondary), #35b7ac);
    color: white;
}

.open-btn:hover {
    background: linear-gradient(135deg, #35b7ac, var(--secondary));
    transform: translateY(-2px);
}

.copy-btn {
    background: linear-gradient(135deg, var(--gray), #5a6268);
    color: white;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #5a6268, var(--gray));
    transform: translateY(-2px);
}

.back-btn {
    background: linear-gradient(135deg, var(--primary), #ff8e53);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    transition: all 0.3s;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.description-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    line-height: 1.8;
}

.share-section {
    background: linear-gradient(135deg, #fff5f5, #fff0f0);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid var(--primary);
}

.share-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
}

/* 相关推荐样式 */
.related-section {
    margin: 40px 0;
}

.section-title {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.related-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid white;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary);
}

.related-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.related-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray);
}

/* 管理员页面样式 */
.admin-tabs {
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    margin: 2rem auto 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 3px solid white;
    gap: 2px;
}

.admin-tab {
    flex: 1;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
    color: var(--gray);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.admin-tab:hover {
    background: white;
    color: var(--primary);
}

.admin-tab.active {
    color: var(--primary);
    background: white;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.15);
}

.admin-panel {
    background: white;
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 35px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    border: 3px solid white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 3px solid #f1f3f5;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.pan-link-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 2px dashed #dee2e6;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #ff8e53);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff8e53, var(--primary));
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #35b7ac);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #35b7ac, var(--secondary));
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc3545);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc3545, var(--danger));
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 20px;
}

.paper-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.paper-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.paper-item:hover {
    background: white;
    transform: translateX(5px);
}

.paper-item-info {
    flex: 1;
}

.paper-item-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.paper-item-meta {
    font-size: 0.9rem;
    color: var(--gray);
}

.paper-item-actions {
    display: flex;
    gap: 10px;
}

/* 编辑页面样式 */
.edit-form-container {
    margin: 20px 0;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f9f7ff 0%, #f0f9ff 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--purple));
}

.login-icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark);
    font-size: 1.8rem;
}

.login-input {
    width: 100%;
    padding: 16px 20px;
    border: 3px solid #f1f3f5;
    border-radius: 14px;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.login-input:focus {
    border-color: var(--primary);
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff8e53 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background: linear-gradient(135deg, #ff8e53, var(--primary));
    transform: translateY(-2px);
}

.error-message {
    color: var(--danger);
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #fff5f5;
    border-radius: 8px;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* 通知样式 */
.notification {
    position: fixed;
    top: 25px;
    right: 25px;
    background: linear-gradient(135deg, var(--green), #05c592);
    color: white;
    padding: 20px 25px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(150%);
    transition: transform 0.4s;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: linear-gradient(135deg, var(--danger), #dc3545);
}

.notification.warning {
    background: linear-gradient(135deg, var(--warning), #ffb347);
}

/* 联系信息样式 */
.contact-footer {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #fff5f5, #fff0f0);
    border-radius: 16px;
    border: 3px solid var(--primary);
}

.wechat-box {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px 30px;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.2);
    transition: all 0.3s;
}

.wechat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.3);
}

.wechat-id {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .paper-item {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .paper-item-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .detail-title {
        font-size: 1.5rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .pan-link-item {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .pan-info {
        flex-wrap: wrap;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
}

/* 复制成功提示 */
.copy-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    z-index: 9999;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.hidden { display: none; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.rounded { border-radius: 0.5rem; }
.rounded-lg { border-radius: 1rem; }
.shadow { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }