:root {
    --primary-color: #E25B45;
    --primary-hover: #C54A36;
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-main: #2C3E50;
    --text-muted: #6C757D;
    --border-radius: 16px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.poll-wrapper {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.poll-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--shadow-soft);
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
}

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

h1.poll-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
    text-transform: uppercase;
    font-weight: 800;
}

p.poll-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    width: 100%;
    background: linear-gradient(135deg, #FF6B52 0%, var(--primary-color) 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(226, 91, 69, 0.2);
    will-change: transform, box-shadow;
}

.btn:hover {
    background: linear-gradient(135deg, #FF7D66 0%, #D8503A 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(226, 91, 69, 0.35);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(226, 91, 69, 0.2);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .poll-card {
        padding: 30px 20px;
    }
    h1.poll-title {
        font-size: 1.5rem;
    }
}

.poll-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.poll-logos img {
    max-width: 45%;
    height: auto;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

.poll-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-main);
    background-color: #F8F9FA;
    border: 2px solid #E9ECEF;
    border-radius: 12px;
    transition: var(--transition);
    outline: none;
    will-change: border-color, box-shadow;
}

.form-control:focus {
    background-color: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(226, 91, 69, 0.1);
}

.error-box {
    background-color: #FFF0F0;
    color: #D32F2F;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #D32F2F;
    font-weight: 500;
    margin-bottom: 20px;
    font-size: 0.95rem;
    animation: fadeInUp 0.4s ease-out;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    margin-left: 4px;
}

.materials-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.material-card {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    background-color: #F8F9FA;
    border: 2px solid #E9ECEF;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.3s ease;
    will-change: border-color, background-color, transform;
}

.material-card:hover {
    background-color: #FFFFFF;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(226, 91, 69, 0.1);
}

.audio-wrapper {
    margin: 20px 0;
    padding: 15px;
    background-color: #F8F9FA;
    border-radius: 12px;
    border: 1px solid #E9ECEF;
    text-align: center;
}

.audio-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

audio {
    width: 100%;
    height: 40px;
    outline: none;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    line-height: 1.4;
}

.question-image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    border-radius: 12px;
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.option-wrapper {
    position: relative;
}

.option-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-label {
    display: block;
    padding: 16px 20px;
    background-color: #F8F9FA;
    border: 2px solid #E9ECEF;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    will-change: border-color, background-color, transform;
}

.option-label:hover {
    background-color: #FFFFFF;
    border-color: #FFB3A7;
    transform: translateY(-2px);
}

.option-input:checked + .option-label {
    background-color: #FFFFFF;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(226, 91, 69, 0.15);
}

.result-header {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 5px;
    font-weight: 800;
    line-height: 1.2;
}

.result-name {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.result-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B52 0%, var(--primary-color) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto 25px;
    box-shadow: 0 8px 25px rgba(226, 91, 69, 0.35);
    will-change: transform;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.result-score-num {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
}

.result-score-text {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 5px;
}

.result-status-box {
    background-color: #F8F9FA;
    border: 2px solid #E9ECEF;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 30px;
}

.result-status-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
}

.result-status-value {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 800;
}

@keyframes scaleIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cert-preview {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin: 10px auto 20px;
    display: block;
}

.btn-dark {
    background: linear-gradient(135deg, #4A5568 0%, #2D3748 100%);
    box-shadow: 0 4px 15px rgba(45, 55, 72, 0.2);
}

.btn-dark:hover {
    background: linear-gradient(135deg, #2D3748 0%, #1A202C 100%);
    box-shadow: 0 8px 25px rgba(45, 55, 72, 0.35);
}

.admin-body {
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: block;
}

.admin-container {
    width: 96%;
    max-width: 1700px;
    margin: 10px auto;
    background: #FFFFFF;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E9ECEF;
}

.admin-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.admin-badge {
    display: inline-block;
    margin-top: 8px;
    background-color: #F1F3F5;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-excel {
    display: inline-block;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    color: white;
    padding: 12px 22px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
    will-change: transform, box-shadow;
}

.btn-excel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(46, 125, 50, 0.35);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.admin-table th {
    background-color: #F8F9FA;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 14px 10px;
    border-bottom: 2px solid #E9ECEF;
}

.admin-table td {
    padding: 14px 10px;
    border-bottom: 1px solid #F1F3F5;
    color: var(--text-main);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background-color 0.2s ease;
}

.admin-table tbody tr:hover {
    background-color: #F8F9FA;
}

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

.col-q {
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    width: 32px;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
}

.status-pobeditel {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-prizer {
    background: #FFF3E0;
    color: #EF6C00;
}

.status-uchastnik {
    background: #E3F2FD;
    color: #1565C0;
}

.video-wrapper {
    margin: 20px 0;
    padding: 15px;
    background-color: #F8F9FA;
    border-radius: 12px;
    border: 1px solid #E9ECEF;
    text-align: center;
}

.video-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poll-video {
    width: 100%;
    max-height: 350px;
    border-radius: 8px;
    background-color: #000000;
    display: block;
    outline: none;
}