/* CEFR Test System - Global Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.logo-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

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

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 20px;
}

th {
    background-color: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    color: #333;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

tr:hover {
    background-color: #f8f9fa;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

h1 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 20px;
}

h2 {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 15px;
    margin-top: 20px;
}

h3 {
    font-size: 20px;
    color: #667eea;
    margin-bottom: 10px;
}

.section-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    margin-bottom: 10px;
}

.badge-grammar {
    background-color: #e8f4f8;
    color: #0277bd;
}

.badge-reading {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.badge-listening {
    background-color: #e8f5e9;
    color: #388e3c;
}

.badge-pronunciation {
    background-color: #fff3e0;
    color: #f57c00;
}

.progress-bar {
    background-color: #eee;
    border-radius: 10px;
    height: 30px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    transition: width 0.3s ease;
}

.nav {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.nav a:hover,
.nav a.active {
    border-bottom-color: white;
}

.admin-nav {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.admin-nav a {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background-color: #667eea;
    color: white;
}

.logout-link {
    float: right;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 0;
}

.logout-link:hover {
    color: white;
}

.question-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.question-number {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
}

.question-text {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.option:hover {
    border-color: #667eea;
    background-color: #f8f9fa;
}

.option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.option input[type="radio"]:checked ~ .option-label {
    color: #667eea;
    font-weight: 600;
}

.option.selected {
    border-color: #667eea;
    background-color: #f0f4ff;
}

.option.correct {
    border-color: #27ae60;
    background-color: #d4edda;
}

.option.incorrect {
    border-color: #e74c3c;
    background-color: #f8d7da;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.result-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.result-section {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.result-score {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.result-percentage {
    font-size: 18px;
    color: #666;
}

.cefr-badge {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin: 20px 0;
}

.cefr-a1 {
    background-color: #e74c3c;
}

.cefr-a2 {
    background-color: #e67e22;
}

.cefr-b1 {
    background-color: #f39c12;
}

.cefr-b2 {
    background-color: #27ae60;
}

.cefr-c1 {
    background-color: #2980b9;
}

.center-content {
    text-align: center;
    padding: 40px 20px;
}

.welcome-text {
    font-size: 18px;
    margin-bottom: 20px;
    color: #666;
}

.start-button {
    padding: 15px 40px;
    font-size: 18px;
}

.footer {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
    }

    .container {
        padding: 15px;
    }

    .card {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
}
