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

:root {
    --primary-color: #B690C8;
    --primary-dark: #9B70AC;
    --secondary-color: #CEA9DD;
    --dark-text: #2B2B2B;
    --gray-bg: #F6F2F9;
    --white: #FFFFFF;
    --border-color: #E0D7E7;
    --shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --radius-large: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    background: linear-gradient(135deg, #F6F2F9 0%, #FFFFFF 50%, #F9F6FC 100%);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(182, 144, 200, 0.03) 35px, rgba(182, 144, 200, 0.03) 70px);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

.main-header {
    background-color: #F6F2F9;
    border-radius: 0 0 var(--radius-large) var(--radius-large);
    box-shadow: 0 10px 30px rgba(182, 144, 200, 0.15);
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 0;
    padding-bottom: 25%; /* PC端保持原比例 */
    background-image: url('/assets/header-bg.jpg?_=1');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain; /* 改为contain确保完整显示 */
    min-height: 200px;
}

.event-info {
    background: var(--white);
    padding: 30px 15px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    text-align: center;
}

.logo {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.event-banner h1 {
    font-size: 2.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, #B690C8, #9B70AC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(182, 144, 200, 0.3);
    letter-spacing: 2px;
}

.event-banner h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--dark-text);
    margin-bottom: 10px;
}

.event-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 5px;
}

.event-date {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.intro-section {
    margin-bottom: 40px;
}

.intro-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
}

.intro-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

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

.tracks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.track-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    color: var(--dark-text);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.track-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(182, 144, 200, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.track-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(182, 144, 200, 0.3);
}

.track-card:hover::before {
    opacity: 1;
}

.track-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.track-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.track-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(90deg, #B690C8, #CEA9DD);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary:hover {
    transform: scale(0.98);
    box-shadow: 0 5px 15px rgba(182, 144, 200, 0.4);
}

.btn-secondary {
    background: var(--gray-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

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

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-gradient {
    background: linear-gradient(90deg, #B690C8, #CEA9DD);
    color: var(--white);
    border: none;
}

.action-section {
    margin: 50px 0;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.action-buttons a {
    text-decoration: none;
    display: inline-block;
}

.qr-section {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    margin: 40px 0;
    text-align: center;
}

.qr-section h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.qr-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.qr-item {
    text-align: center;
}

.qr-code {
    width: 150px;
    height: 150px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-item p {
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: 500;
}

.main-footer {
    text-align: center;
    padding: 30px 15px;
    background: var(--white);
    margin-top: 50px;
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    color: #666;
}

.page-header {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    display: inline-block;
    margin-bottom: 10px;
}

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

.page-header h1 {
    color: var(--dark-text);
    font-size: 1.8rem;
    font-weight: 600;
}

.submit-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 40px;
}

.form-section h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-bg);
}

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

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

.required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.char-counter {
    text-align: right;
    color: #999;
    font-size: 0.9rem;
    margin-top: 5px;
}

.field-hint {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--gray-bg);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
}

.radio-item:hover {
    background: var(--border-color);
}

.radio-item input[type="radio"] {
    width: auto;
    margin-right: 10px;
}

.radio-item input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.file-preview {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.file-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid var(--border-color);
}

.form-actions {
    text-align: center;
    margin-top: 40px;
}

.search-bar {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
}

.search-bar input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
}

.search-bar select {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
}

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

.entry-card {
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
}

.entry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(182, 144, 200, 0.3);
}

.entry-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gray-bg);
}

.entry-cover-wrapper {
    width: 100%;
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    overflow: hidden;
}

.entry-content {
    padding: 20px;
}

.entry-title {
    font-size: 1.2rem;
    color: var(--dark-text);
    margin-bottom: 10px;
    font-weight: 600;
}

.entry-author {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.entry-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--gray-bg);
}

.vote-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    font-weight: 600;
}

.vote-btn {
    padding: 8px 20px;
    background: linear-gradient(90deg, #B690C8, #CEA9DD);
    color: var(--white);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.vote-btn:hover {
    transform: scale(0.98);
}

.vote-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-large);
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    color: var(--dark-text);
    margin-bottom: 20px;
}

.captcha-container {
    margin-bottom: 25px;
}

.captcha-container p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.captcha-container input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.modal-actions button {
    flex: 1;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-text);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 25px;
    display: none;
    z-index: 2000;
    animation: slideUp 0.3s ease;
}

.toast.show {
    display: block;
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

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

.loading {
    text-align: center;
    padding: 50px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.no-data {
    text-align: center;
    padding: 50px;
    color: #999;
    font-size: 1.1rem;
}

.track-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--white);
    color: var(--dark-text);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.tab-btn.active {
    background: linear-gradient(90deg, #B690C8, #CEA9DD);
    color: var(--white);
    border-color: transparent;
}

.rank-list {
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    padding: 20px;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-bg);
    transition: all 0.3s;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item:hover {
    background: var(--gray-bg);
}

.rank-number {
    width: 50px;
    height: 50px;
    background: var(--gray-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 20px;
}

.rank-item.top-1 .rank-number {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--white);
}

.rank-item.top-2 .rank-number {
    background: linear-gradient(135deg, #C0C0C0, #999);
    color: var(--white);
}

.rank-item.top-3 .rank-number {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: var(--white);
}

.rank-info {
    flex: 1;
}

.rank-title {
    font-size: 1.1rem;
    color: var(--dark-text);
    margin-bottom: 5px;
    font-weight: 600;
}

.rank-meta {
    color: #666;
    font-size: 0.9rem;
}

.rank-votes {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: bold;
}

.refresh-info {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

.login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.btn-block {
    width: 100%;
}

.admin-header {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-actions {
    display: flex;
    gap: 15px;
}

.status-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.batch-actions {
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-success {
    background: #27ae60;
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
}

.btn-danger {
    background: #e74c3c;
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

.table-container {
    background: var(--white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--gray-bg);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-text);
}

.admin-table td {
    padding: 15px;
    border-top: 1px solid var(--gray-bg);
}

.admin-table tbody tr:hover {
    background: var(--gray-bg);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons button {
    padding: 5px 15px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-header {
        padding-bottom: 50%; /* 增加高度以显示完整图片 */
        min-height: 180px;
        background-size: contain; /* 完整显示图片 */
        background-position: center center;
        background-repeat: no-repeat;
    }
    
    .event-banner h1 {
        font-size: 1.8rem;
    }
    
    .event-banner h2 {
        font-size: 1.2rem;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
    
    .tracks-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .entries-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 800px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding-bottom: 60%; /* 小屏手机增加高度 */
        min-height: 150px;
        background-size: contain; /* 确保完整显示背景图 */
        background-position: center top; /* 顶部对齐 */
        background-repeat: no-repeat;
    }
    
    .event-info {
        padding: 20px 15px;
    }
    
    .intro-card {
        padding: 20px 15px;
    }
}