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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4facfe;
    --warning-color: #43e97b;
    --danger-color: #fa709a;
    --dark-bg: #0f0f23;
    --card-bg: #1a1a2e;
    --surface-bg: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a8a8b3;
    --border-color: #2a2a4a;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--dark-bg);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(67, 233, 123, 0.1) 0%, transparent 50%);
    min-height: 100vh;
    overflow-x: hidden;
}

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

header {
    text-align: center;
    margin-bottom: 50px;
    padding: 50px 0;
    background: var(--gradient-1);
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
    animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

header p {
    font-size: 1.3rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

section {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
}

h2 {
    color: var(--text-primary);
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.table-container {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--surface-bg);
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-primary);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

tr {
    transition: background-color 0.3s ease;
}

tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.view-btn {
    background: var(--gradient-3);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.pdb-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pdb-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    background: var(--surface-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-width: 200px;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.view-controls {
    display: flex;
    gap: 10px;
}

button {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pdb-viewer {
    width: 100%;
    height: 500px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-bg);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pdb-info {
    padding: 20px;
    background: var(--surface-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pdb-info h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.pdb-info p {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.pdb-info strong {
    color: var(--primary-color);
}

.score-good {
    color: var(--success-color);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(67, 233, 123, 0.5);
}

.score-medium {
    color: var(--warning-color);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(247, 203, 123, 0.5);
}

.score-poor {
    color: var(--danger-color);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(250, 112, 154, 0.5);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    main {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 30px 0;
        margin-bottom: 30px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 20px;
    }
    
    .pdb-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-controls {
        justify-content: center;
    }
    
    th, td {
        padding: 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    main {
        gap: 20px;
    }
    
    .pdb-viewer {
        height: 350px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

section {
    animation: fadeIn 0.6s ease-out;
}

section:nth-child(2) {
    animation-delay: 0.2s;
}

/* 玻璃态效果 */
.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
