:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #6c757d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.upload-card, .result-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 3rem;
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease;
}

.upload-card:hover {
    transform: translateY(-5px);
}

.icon-container {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.file-input-wrapper {
    margin: 2rem 0;
    position: relative;
}

input[type="file"] {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #e9ecef;
    color: var(--text-color);
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px dashed #ced4da;
    transition: all 0.3s ease;
    width: 80%;
}

.file-label:hover {
    background-color: #dde2e6;
    border-color: var(--primary-color);
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    margin-top: 2rem;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.loading {
    margin-top: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

/* Result Page Styles */
.result-card.paced .status-icon {
    color: var(--success-color);
}

.result-card.not-paced .status-icon {
    color: var(--warning-color);
}

.mode-badge {
    display: inline-block;
    background-color: #e3f2fd;
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    margin: 1rem 0;
}

.plot-container {
    margin-top: 2rem;
    border: 1px solid #eee;
    border-radius: var(--radius);
    overflow: hidden;
}

.result-plot {
    width: 100%;
    height: auto;
    display: block;
}

footer {
    margin-top: auto;
    padding-top: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
