/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 主要内容 */
.main {
    padding: 2rem 0;
}

/* 投票说明 */
.vote-notice {
    margin-bottom: 2rem;
}

.notice-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notice-card h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.notice-card ul {
    list-style: none;
}

.notice-card li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.notice-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* 筛选器 */
.filters {
    margin-bottom: 2rem;
}

.filters .container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #333;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.reset-btn {
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.reset-btn:hover {
    background: #5a6fd8;
}

/* 排行榜 */
.ranking {
    margin-bottom: 3rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-list {
    display: grid;
    gap: 1.5rem;
}

.brand-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.brand-rank {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    min-width: 60px;
    text-align: center;
}

.brand-rank.top-1 {
    color: #ffd700;
}

.brand-rank.top-2 {
    color: #c0c0c0;
}

.brand-rank.top-3 {
    color: #cd7f32;
}

.brand-info {
    flex: 1;
}

.brand-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.brand-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.brand-type,
.brand-region {
    background: #f8f9fa;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
}

.brand-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.brand-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.vote-count {
    font-size: 1.1rem;
    font-weight: bold;
    color: #667eea;
}

.brand-actions {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
    align-items: center;
}

.vote-btn {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.vote-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.vote-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.detail-btn {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 80px;
    font-size: 0.9rem;
}

.detail-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

.brand-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.brand-link:hover {
    color: #667eea;
    text-decoration: none;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 2rem;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 关于页面 */
.about {
    margin-bottom: 3rem;
}

.about-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #555;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: #333;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    flex: 1;
    transition: background 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: #333;
    color: white;
    border-radius: 8px;
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #333;
}

/* 底部 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filters .container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-group {
        justify-content: space-between;
    }
    
    .brand-item {
        flex-direction: column;
        text-align: center;
    }
    
    .brand-details {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 30% auto;
        width: 95%;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .notice-card,
    .about-content {
        padding: 1.5rem;
    }
    
    .brand-item {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 动画效果 */
.brand-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.brand-item:nth-child(1) { animation-delay: 0.1s; }
.brand-item:nth-child(2) { animation-delay: 0.2s; }
.brand-item:nth-child(3) { animation-delay: 0.3s; }
.brand-item:nth-child(4) { animation-delay: 0.4s; }
.brand-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}