* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2980, #26d0ce);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.container {
    width: 100%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin: 20px;
}

header {
    background: linear-gradient(to right, #3a7bd5, #00d2ff);
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.content {
    padding: 25px;
}

.input-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

input {
    flex: 1;
    padding: 15px 18px;
    border: 2px solid #ddd;
    border-radius: 12px 0 0 12px;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border-color: #3a7bd5;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.2);
}

button {
    background: linear-gradient(to right, #3a7bd5, #00a8ff);
    color: white;
    border: none;
    padding: 0 30px;
    border-radius: 0 12px 12px 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background: linear-gradient(to right, #2a6bc5, #0098e6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-section {
    text-align: center;
    padding: 25px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
}

.result-placeholder {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.5;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#placeholder-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #3a7bd5;
}

.placeholder-sub {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #868e96;
}

.student-name {
    font-size: 1.6rem;
    color: #3a7bd5;
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.score-display {
    font-size: 5rem;
    font-weight: 800;
    color: #3a7bd5;
    margin: 15px 0 10px;
    text-shadow: 0 5px 15px rgba(58, 123, 213, 0.3);
    animation: pulse 1.5s infinite;
}

.score-range {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #6c757d;
}

.detail-btn {
    margin-top: 10px;
    padding: 10px 25px;
    background: linear-gradient(to right, #ff6b6b, #ff9e7d);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.detail-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

.subject-scores {
    display: none;
    width: 100%;
    max-width: 700px;
    margin-top: 25px;
    animation: fadeIn 0.8s ease-out;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.subject-card {
    background: linear-gradient(to bottom right, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 18px 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.subject-name {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    z-index: 2;
    position: relative;
}

.subject-score {
    font-size: 1.6rem;
    font-weight: 700;
    color: #3a7bd5;
    z-index: 2;
    position: relative;
    margin: 6px 0;
}

.subject-max {
    font-size: 0.85rem;
    color: #6c757d;
    z-index: 2;
    position: relative;
}

.score-percentage {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(58, 123, 213, 0.2);
    color: #3a7bd5;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 20px;
    z-index: 2;
}

.results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    justify-content: center;
}

.info-container {
    flex: 1;
    min-width: 300px;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.probability-chart {
    display: flex;
    height: 25px;
    width: 100%;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin: 12px 0;
}

.low-range {
    background: #ff6b6b;
    width: 5%;
}

.mid-range {
    background: #4cd97b;
    width: 90%;
}

.high-range {
    background: #ffd166;
    width: 5%;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 6px;
    margin-bottom: 12px;
}

.probability-info {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.9rem;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.color-box {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    border-radius: 3px;
}

.low-color { background: #ff6b6b; }
.mid-color { background: #4cd97b; }
.high-color { background: #ffd166; }

footer {
    text-align: center;
    padding: 15px;
    color: #6c757d;
    font-size: 0.85rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    line-height: 1.5;
}

.footer-sub {
    margin-top: 8px;
    font-size: 0.75rem;
    opacity: 0.7;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-content {
    animation: fadeIn 0.8s ease-out;
    width: 100%;
    display: none;
}

.logo {
    position: absolute;
    top: 15px;
    left: 25px;
    font-size: 2.2rem;
    color: white;
}

.score-info h3 {
    color: #3a7bd5;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.subject-header {
    text-align: center;
    margin-bottom: 20px;
}

.subject-header h3 {
    color: #3a7bd5;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.subject-header p {
    color: #6c757d;
    font-size: 0.95rem;
}

.analysis-section {
    margin-top: 20px;
    text-align: left;
    line-height: 1.5;
}

.analysis-section h3 {
    color: #3a7bd5;
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.analysis-section p {
    margin-top: 12px;
    font-size: 0.9rem;
}

.analysis-section ul {
    margin-left: 18px;
    margin-top: 8px;
    font-size: 0.9rem;
}

.warning-message {
    background: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 15px auto;
    max-width: 500px;
    font-size: 0.9rem;
    display: none;
}

/* 移动设备样式 */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .subtitle { font-size: 0.95rem; }
    .input-group { flex-direction: column; }
    input { border-radius: 12px; margin-bottom: 12px; }
    button { border-radius: 12px; padding: 14px; width: 100%; }
    .score-display { font-size: 3.8rem; }
    .logo { position: static; margin-bottom: 12px; }
    .subject-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .info-container { min-width: 100%; }
    .results-container { flex-direction: column; gap: 15px; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    .score-display { font-size: 3rem; }
    .student-name { font-size: 1.3rem; }
    .subject-grid { grid-template-columns: 1fr; }
    .detail-btn { padding: 8px 16px; font-size: 0.95rem; }
    .content { padding: 15px; }
    .input-section { padding: 18px; }
}
