/* ===== 重置样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 基础样式 ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* ===== 容器样式 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ===== 头部样式 ===== */
.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../res/images/aris.png') center/cover no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* ===== 内容区域样式 ===== */
.content {
    padding: 40px 30px;
}

/* ===== 投票区域样式 ===== */
.vote-section {
    margin-bottom: 40px;
}

.vote-section h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8em;
    font-weight: 400;
    text-align: center;
}

/* ===== 投票选项网格样式 ===== */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* ===== 投票项卡片样式 ===== */
.vote-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 380px;
}

.vote-card:hover {
    border-color: #4facfe;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

.vote-card.selected {
    border-color: #4facfe;
    background: linear-gradient(135deg, #4facfe10 0%, #00f2fe10 100%);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.2);
}

/* ===== 投票项图片区域 ===== */
.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vote-card:hover .card-image img {
    transform: scale(1.05);
}

/* ===== 选中状态指示器 ===== */
.selected-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    border: 2px solid #adb5bd;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.vote-card.selected .selected-indicator {
    border-color: #4facfe;
    background: #4facfe;
}

.vote-card.selected .selected-indicator::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* ===== 音频播放器区域 ===== */
.card-audio {
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #e9ecef;
}

.card-audio audio {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    outline: none;
}

.card-audio audio::-webkit-media-controls-panel {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

.card-audio audio::-webkit-media-controls-play-button {
    background-color: #4facfe;
    border-radius: 50%;
}

/* ===== 投票项名称区域 ===== */
.card-name {
    padding: 20px 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-name .name-text {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.vote-card.selected .card-name .name-text {
    color: #4facfe;
}

/* ===== 导航按钮区域 ===== */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 0 20px;
}

.nav-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4);
}

.nav-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nav-btn.prev::before {
    content: '←';
    font-size: 1.2em;
}

.nav-btn.next::after {
    content: '→';
    font-size: 1.2em;
}

/* ===== 投票按钮样式 ===== */
.vote-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: block;
    margin: 30px auto 0;
    position: relative;
    overflow: hidden;
}

.vote-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
}

.vote-btn:hover::before {
    left: 100%;
}

.vote-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.vote-btn:disabled::before {
    display: none;
}

/* ===== 消息样式 ===== */
.message {
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .content {
        padding: 30px 20px;
    }
    
    .options-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .vote-card {
        height: 350px;
    }
    
    .card-image {
        height: 180px;
    }
    
    .navigation-buttons {
        padding: 0 10px;
    }
    
    .nav-btn {
        padding: 10px 25px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .vote-section h2 {
        font-size: 1.5em;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vote-card {
        height: 320px;
    }
    
    .card-image {
        height: 160px;
    }
    
    .card-name .name-text {
        font-size: 1.2em;
    }
    
    .vote-btn {
        padding: 12px 30px;
        font-size: 1em;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== 打印样式 ===== */
@media print {
    body {
        background: white !important;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .vote-btn,
    .card-audio,
    .nav-btn {
        display: none;
    }
}

/* ===== 无障碍支持 ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== 高对比度模式支持 ===== */
@media (prefers-contrast: high) {
    .vote-card {
        border-width: 3px;
    }
    
    .vote-btn,
    .nav-btn {
        background: #0056b3;
    }
}
