:root {
    --font-size-base: 16px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e8f0 100%);
    min-height: 100vh;
    color: #333;
    font-size: var(--font-size-base);
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 60px;
    background: linear-gradient(180deg, #1a2a3a 0%, #0d1b2a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 8px;
}

.nav-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    color: #8a9aa8;
}

.nav-item:hover svg,
.nav-item.active svg {
    color: #00d4aa;
}

.nav-item.active {
    background: rgba(0, 212, 170, 0.1);
}

/* 悬浮提示 */
.nav-item[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 55px;
    top: 50%;
    transform: translateY(-50%);
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-item[data-tooltip]::after {
    content: '';
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #2c3e50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-item[data-tooltip]:hover::before,
.nav-item[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

.nav-item[data-tooltip]:hover::before {
    left: 60px;
}

.nav-item[data-tooltip]:hover::after {
    left: 48px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

/* 头部 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.header-left h1 {
    font-size: 32px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.header-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #7f8c8d;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.font-size {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #7f8c8d;
}

.size-btn {
    padding: 4px 10px;
    border: 1px solid #bdc3c7;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.size-btn:hover,
.size-btn.active {
    background: #00d4aa;
    color: white;
    border-color: #00d4aa;
}

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

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background: white;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    color: #7f8c8d;
}

/* 标签切换 */
.tabs {
    display: flex;
    gap: 40px;
    margin-bottom: 10px;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    padding-bottom: 15px;
    justify-content: center;
}

.tab-btn {
    background: none;
    border: none;
    font-size: 22px;
    font-weight: 500;
    color: #95a5a6;
    cursor: pointer;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active {
    color: #00d4aa;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: 0;
    right: 0;
    height: 3px;
    background: #00d4aa;
    border-radius: 2px;
}

.badge {
    background: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* 排序提示 */
.sort-hint {
    text-align: center;
    color: #95a5a6;
    font-size: 13px;
    margin: 20px 0;
}

/* 列表视图 */
.list-view {
    display: none;
}

.list-view.active {
    display: block;
}

.drivers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
}

.driver-row {
    background: rgba(255,255,255,0.7);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.driver-row:hover {
    background: rgba(255,255,255,0.95);
}

.driver-number {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    min-width: 35px;
}

.team-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.country-code {
    font-size: 12px;
    color: #7f8c8d;
    min-width: 35px;
}

.driver-name {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
}

.driver-name .en {
    color: #95a5a6;
    font-size: 12px;
    margin-left: 5px;
}

.grade {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    min-width: 30px;
    text-align: right;
}

/* 详情视图 */
.detail-view {
    display: none;
}

.detail-view.active {
    display: block;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.6);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: white;
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

.driver-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.driver-card {
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    gap: 25px;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.driver-photo {
    width: 140px;
    height: 160px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.driver-photo-placeholder {
    width: 140px;
    height: 160px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

.driver-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.info-label {
    font-size: 12px;
    color: #7f8c8d;
    background: rgba(0,0,0,0.05);
    padding: 4px 12px;
    border-radius: 4px;
}

.info-value {
    font-size: 14px;
    color: #2c3e50;
}

.driver-name-large {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 5px 0;
}

.driver-name-large .en {
    font-size: 16px;
    color: #7f8c8d;
    font-weight: 400;
}

.grade-large {
    font-size: 20px;
    font-weight: 700;
    color: #00d4aa;
}

/* 印章效果 */
.stamp {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%) rotate(-15deg);
    width: 140px;
    height: 140px;
    border: 4px solid #e74c3c;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    font-weight: bold;
    opacity: 0.9;
}

.stamp-text {
    font-size: 42px;
    letter-spacing: 8px;
    font-weight: 900;
}

.stamp-sub {
    font-size: 12px;
    margin-top: 5px;
    letter-spacing: 2px;
    border-top: 2px solid #e74c3c;
    padding-top: 5px;
}

/* 水印效果 */
.watermark {
    position: absolute;
    font-size: 60px;
    color: rgba(0,0,0,0.03);
    font-weight: bold;
    transform: rotate(-30deg);
    pointer-events: none;
    white-space: nowrap;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 80px;
    right: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    min-width: 320px;
    max-width: 400px;
    z-index: 1000;
    display: none;
    animation: slideDown 0.2s ease-out;
}

.dropdown-menu.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.dropdown-content {
    padding: 20px;
}

.dropdown-content p {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.8;
    margin-bottom: 12px;
}

.dropdown-content p:last-child {
    margin-bottom: 0;
}

/* 页面切换 */
.page-container {
    position: relative;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 主页面样式 */
.home-content {
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.home-content h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

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

.intro-section h3 {
    font-size: 20px;
    color: #00d4aa;
    margin-bottom: 15px;
}

.intro-section p {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
}

.intro-section ul {
    list-style: none;
    padding-left: 0;
}

.intro-section li {
    font-size: 16px;
    color: #555;
    line-height: 2;
    padding-left: 20px;
    position: relative;
}

.intro-section li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #00d4aa;
}

/* 占位页面样式 */
.placeholder-content {
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.placeholder-content h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.placeholder-content p {
    font-size: 16px;
    color: #7f8c8d;
}

.dropdown-content p:last-child {
    margin-bottom: 0;
}

/* 响应式 */
@media (max-width: 1024px) {
    .drivers-grid {
        grid-template-columns: 1fr;
    }
    
    .driver-card {
        flex-direction: column;
    }
    
    .stamp {
        position: relative;
        right: auto;
        top: auto;
        transform: rotate(-15deg);
        margin: 20px auto 0;
    }
}
