/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Главная страница */
.index-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
}

.language-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.language-btn:hover {
    background: rgba(255,255,255,0.3);
}

.admin-login {
    position: absolute;
    top: 20px;
    left: 20px;
}

.admin-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px;
}

.logo {
    font-size: 4rem;
    margin-bottom: 30px;
    background: white;
    color: #667eea;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.welcome-text {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.start-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 30px;
    font-weight: bold;
    transition: transform 0.3s;
}

.start-btn:hover {
    transform: scale(1.05);
}

/* Страницы входа */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

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

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #5a6fd8;
}

.back-btn {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #667eea;
    text-decoration: none;
}

.error {
    color: red;
    text-align: center;
    margin-bottom: 15px;
}

.info {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #333;
}

/* Страница информации о студенте */
.info-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 500px;
}

.info-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Страница тестирования */
.test-body {
    background: #f5f5f5;
    min-height: 100vh;
}

.timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff6b6b;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1000;
}

.test-container {
    max-width: 800px;
    margin: 80px auto 40px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.question {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

.option {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.option:hover {
    background: #f9f9f9;
}

.option input {
    margin-right: 10px;
}

.progress {
    margin-bottom: 20px;
    font-weight: bold;
    color: #667eea;
}

/* Страница результатов */
.result-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.result-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.result-container h2 {
    color: #333;
    margin-bottom: 30px;
}

.score {
    font-size: 3rem;
    color: #667eea;
    margin: 20px 0;
    font-weight: bold;
}

.place {
    font-size: 1.5rem;
    color: #ff6b6b;
    margin-bottom: 30px;
    font-weight: bold;
}

.student-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    text-align: left;
}

.info-row {
    margin-bottom: 10px;
    display: flex;
}

.info-label {
    font-weight: bold;
    width: 200px;
}

.diploma-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
    transition: background 0.3s;
}

.diploma-btn:hover {
    background: #218838;
}

.new-test-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
    transition: background 0.3s;
}

.new-test-btn:hover {
    background: #5a6fd8;
}

.no-diploma {
    color: #6c757d;
    font-style: italic;
    margin: 20px 0;
}

/* Админ панель */
.admin-body {
    background: #f5f5f5;
}

.header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 1.1rem;
}

.recent-results {
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f8f9fa;
    font-weight: bold;
}

.nav {
    display: flex;
    gap: 10px;
    margin: 20px;
}

.nav-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.logout-btn {
    background: #dc3545;
}

/* Адаптивность */
@media (max-width: 768px) {
    .logo {
        font-size: 3rem;
        width: 120px;
        height: 120px;
    }
    
    .welcome-text {
        font-size: 2rem;
    }
    
    .test-container {
        margin: 100px 20px 40px;
        padding: 20px;
    }
    
    .timer {
        top: 10px;
        right: 10px;
        font-size: 1rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-label {
        width: 100%;
        margin-bottom: 5px;
    }
}