:root {
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #f8fafc;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --accent-light: #eff6ff;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-dark);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.user-greeting {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.user-greeting a {
    background: var(--danger);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.user-greeting a:hover {
    background: #dc2626;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: var(--border-medium);
    cursor: not-allowed;
    transform: none;
}

.cancel-btn {
    background: var(--text-muted);
}

.cancel-btn:hover {
    background: var(--text-secondary);
}

nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

nav ul li a {
    color: var(--text-secondary);
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--accent);
}

.description {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.description h3 {
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.description p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.description p:last-child {
    margin-bottom: 0;
}

.auth-card {
    max-width: 450px;
    margin: 2rem auto;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 1rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    background: var(--bg-surface);
}

.auth-tab.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    background: var(--accent-light);
}

.auth-form {
    padding: 2rem;
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.75rem;
    text-align: center;
}

.success-message {
    color: var(--success);
    font-size: 0.875rem;
    margin-top: 0.75rem;
    text-align: center;
}

.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.variant-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.variant-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border-medium);
}

.variant-card strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.question-block {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.question-block:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
}

.question-block p {
    margin-bottom: 1rem;
    font-weight: 500;
}

.question-block input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition);
}

.question-block input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-container {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tab {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.tab:hover {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

.tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.admin-content {
    flex: 1;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
    font-weight: 600;
}

.admin-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.admin-table tr:hover {
    background: var(--bg-secondary);
}

.status-pending {
    background: var(--warning-light);
    color: var(--warning);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.status-approved {
    background: var(--success-light);
    color: var(--success);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.status-rejected {
    background: var(--danger-light);
    color: var(--danger);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-content h2 {
    margin-bottom: 1rem;
}

.modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.results-table th {
    text-align: left;
    padding: 1rem;
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.results-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.results-table tr:hover {
    background: var(--bg-secondary);
}

.status-comment-cell {
    max-width: 250px;
}

.status-text {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.comment-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.answers-header {
    display: grid;
    grid-template-columns: 3fr 2fr 2fr 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0.5rem;
}

.answer-row {
    display: grid;
    grid-template-columns: 3fr 2fr 2fr 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
}

.answer-question {
    font-weight: 500;
    color: var(--text-primary);
}

.answer-user,
.answer-correct {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.answer-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tab {
        flex: 1;
        text-align: center;
    }

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

    .answers-header,
    .answer-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .answers-header {
        display: none;
    }

    .answer-row {
        padding: 1rem;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
    }

    .answer-row div:before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .admin-table,
    .results-table {
        font-size: 0.75rem;
    }

    .admin-table th,
    .admin-table td,
    .results-table th,
    .results-table td {
        padding: 0.5rem;
    }
}

button.make-admin,
button.remove-admin {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

button.remove-admin {
    background: var(--danger);
}

button.make-admin:hover,
button.remove-admin:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.delete-question-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
}

.delete-question-btn:hover {
    background: #dc2626;
}

#questionFormContainer {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

#questionFormContainer input {
    width: 100%;
    padding: 0.625rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

#questionFormContainer input:focus {
    outline: none;
    border-color: var(--accent);
}

.delete-variant {
    background: var(--danger);
    margin-left: 0.5rem;
}

.delete-variant:hover {
    background: #dc2626;
}

.edit-variant {
    background: var(--warning);
}

.edit-variant:hover {
    background: #d97706;
}

.btn-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--success);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-check:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-check:active {
    transform: translateY(0);
}

.home_label {
    width: 100%;
    height: 400px;
    border-radius: 25px;
    box-shadow: 0 5px 20px black;
    margin-top: 20px;

    transition-duration: 500ms;
}

.home_label:hover {
    transform: scale(1.01);
}