* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
    --primary-color: #000000;
    --primary-hover: #333333;
    --bg-light: #ffffff;
    --bg-secondary: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --border-color: #d2d2d7;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --hover-scale: scale(1.02);
}

body {
    background: var(--bg-secondary);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

#login-page,
#register-page {
    background: var(--bg-secondary);
    align-items: center;
}

#login-page .container,
#register-page .container {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 1px solid var(--border-color);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    transition: var(--transition);
    background: var(--bg-light);
    color: var(--text-primary);
}

input:hover, select:hover, textarea:hover {
    border-color: var(--text-secondary);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::after {
    width: 300px;
    height: 300px;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

button:active {
    transform: translateY(0);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 10px;
}

.btn-primary {
    background: var(--primary-color);
}

.btn-secondary {
    background: var(--text-secondary);
}

.btn-secondary:hover {
    background: #6c6c72;
}

.btn-danger {
    background: var(--error-color);
}

.btn-danger:hover {
    background: #bd2130;
}

p {
    text-align: center;
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

.error {
    color: var(--error-color);
    text-align: center;
    margin-top: 12px;
    min-height: 20px;
    font-size: 0.9rem;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 20px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    transition: var(--transition);
}

.logo:hover {
    transform: var(--hover-scale);
}

.nav-links {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    background: var(--bg-light);
    padding: 4px;
    border-radius: 40px;
    border: 1px solid var(--border-color);
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 14px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.segmented {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: var(--bg-light);
    padding: 4px;
    border-radius: 40px;
    width: 160px;
    height: 40px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.segmented:hover {
    border-color: var(--text-secondary);
}

.segmented input {
    display: none;
}

.segmented label {
    text-align: center;
    padding: 8px 0;
    cursor: pointer;
    z-index: 1;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.segmented label:hover {
    color: var(--text-primary);
}

.indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: var(--text-primary);
    border-radius: 40px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#t1:checked ~ .indicator,
#t1-tasks:checked ~ .indicator,
#t1-pvp:checked ~ .indicator,
#t1-settings:checked ~ .indicator {
    transform: translateX(0);
}

#t2:checked ~ .indicator,
#t2-tasks:checked ~ .indicator,
#t2-pvp:checked ~ .indicator,
#t2-settings:checked ~ .indicator {
    transform: translateX(calc(100% + 4px));
}

.btn-logout {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-logout:hover {
    background: #f0f0f0;
    color: var(--error-color);
    border-color: var(--error-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.btn-logout:hover i {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

.profile-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .profile-container {
        grid-template-columns: 1fr;
    }
    .header {
        flex-direction: column;
        align-items: stretch;
    }
    .nav-links {
        justify-content: center;
    }
}

.profile-sidebar {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    height: fit-content;
    position: sticky;
    top: 30px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.profile-sidebar:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.profile-header {
    text-align: center;
    margin-bottom: 24px;
}

.profile-avatar-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--text-secondary);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.profile-avatar-placeholder:hover {
    transform: rotate(5deg) scale(1.1);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.profile-title {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.profile-details {
    margin-top: 24px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 8px 0;
    transition: var(--transition);
    animation: fadeInRight 0.5s ease;
    animation-fill-mode: both;
}

.detail-item:nth-child(1) { animation-delay: 0.1s; }
.detail-item:nth-child(2) { animation-delay: 0.2s; }
.detail-item:nth-child(3) { animation-delay: 0.3s; }
.detail-item:nth-child(4) { animation-delay: 0.4s; }
.detail-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.detail-item:hover {
    transform: translateX(5px);
    background: var(--bg-secondary);
    border-radius: 8px;
    padding-left: 8px;
}

.detail-icon {
    width: 36px;
    height: 36px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: var(--transition);
}

.detail-item:hover .detail-icon {
    transform: rotate(360deg);
    background: var(--text-primary);
    color: white;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--text-secondary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.card-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.card-link:hover {
    gap: 8px;
}

.card-link i {
    transition: var(--transition);
}

.card-link:hover i {
    transform: translateX(3px);
}

.about-text {
    line-height: 1.6;
    color: var(--text-primary);
    padding: 4px 0;
    font-size: 0.95rem;
}

.edit-form {
    display: none;
    animation: slideDown 0.3s ease;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--bg-light);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    transform: translateY(-2px);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.form-buttons .btn {
    width: auto;
    padding: 8px 20px;
    margin-top: 0;
}

.footer {
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.tasks-controls {
    display: flex;
    gap: 16px;
    margin: 30px 0;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease;
}

.tasks-controls select {
    flex: 1 1 200px;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.task-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.5s ease;
    animation-fill-mode: both;
}

.task-card:nth-child(1) { animation-delay: 0.1s; }
.task-card:nth-child(2) { animation-delay: 0.2s; }
.task-card:nth-child(3) { animation-delay: 0.3s; }
.task-card:nth-child(4) { animation-delay: 0.4s; }
.task-card:nth-child(5) { animation-delay: 0.5s; }
.task-card:nth-child(6) { animation-delay: 0.6s; }

.task-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--text-primary);
}

.task-card h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
}

.task-card:hover h3 {
    transform: translateX(5px);
}

.task-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 0.85rem;
}

.task-difficulty {
    padding: 4px 12px;
    border-radius: 40px;
    font-weight: 500;
    transition: var(--transition);
}

.task-card:hover .task-difficulty {
    transform: scale(1.05);
}

.difficulty-easy {
    background: #e8f5e9;
    color: #2e7d32;
}

.difficulty-medium {
    background: #fff3e0;
    color: #ef6c00;
}

.difficulty-hard {
    background: #ffebee;
    color: #c62828;
}

.pvp-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease;
}

.pvp-actions button {
    position: relative;
    overflow: hidden;
}

.pvp-actions button i {
    transition: var(--transition);
}

.pvp-actions button:hover i {
    transform: scale(1.2) rotate(5deg);
}

.pvp-content {
    min-height: 200px;
    padding: 30px !important;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.match-card {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    animation: slideInRight 0.5s ease;
    animation-fill-mode: both;
}

.match-card:nth-child(1) { animation-delay: 0.1s; }
.match-card:nth-child(2) { animation-delay: 0.2s; }
.match-card:nth-child(3) { animation-delay: 0.3s; }
.match-card:nth-child(4) { animation-delay: 0.4s; }
.match-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.match-card:hover {
    transform: translateX(8px) scale(1.01);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--text-primary);
}

.match-card .btn-small {
    padding: 6px 14px;
    font-size: 13px;
    width: auto;
}

.match-container {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.5s ease;
}

.match-info {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.problem-box {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    border-left: 4px solid var(--text-primary);
    transition: var(--transition);
}

.problem-box:hover {
    transform: translateX(5px);
    border-left-width: 8px;
}

.problem-description {
    font-size: 1.1rem;
    line-height: 1.6;
}

.match-result-box {
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 20px 0;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.match-result-box.victory {
    background: #e8f5e9;
    color: #2e7d32;
}

.match-result-box.defeat {
    background: #ffebee;
    color: #c62828;
}

.match-result-box.draw {
    background: #fff3e0;
    color: #ef6c00;
}

.rating-up {
    color: var(--success-color);
    font-weight: 500;
    display: inline-block;
    animation: bounce 0.5s ease;
}

.rating-down {
    color: var(--error-color);
    font-weight: 500;
    display: inline-block;
    animation: shake 0.5s ease;
}

.waiting-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 30px;
    animation: pulse 2s infinite;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.settings-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.checkbox-label:hover {
    background-color: var(--bg-secondary);
    transform: translateX(5px);
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: var(--transition);
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--text-primary);
    transform: scale(1.1);
}

.checkbox-label input:checked + .checkbox-custom {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    animation: checkPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    flex: 1;
}

.danger-zone {
    padding: 16px;
    background-color: #ffebee;
    border-radius: 12px;
    border: 1px solid #ffcdd2;
    transition: var(--transition);
}

.danger-zone:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.15);
}

.danger-text {
    color: var(--error-color);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
}

.close-modal:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1001;
    font-weight: 500;
    font-size: 0.95rem;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

body.night-theme {
    --bg-light: #1c1c1e;
    --bg-secondary: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #98989d;
    --border-color: #3a3a3c;
    background: #000000 !important;
}

body.night-theme .btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.night-theme .difficulty-easy {
    background: #1b3a1b;
    color: #a5d6a5;
}

body.night-theme .difficulty-medium {
    background: #3a3a1b;
    color: #ffd54f;
}

body.night-theme .difficulty-hard {
    background: #3a1b1b;
    color: #ef9a9a;
}

body.night-theme .danger-zone {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.3);
}

.fa-gauge-high, .fa-chart-line {
    font-size: 1.2rem;
}

#profile-speed, #profile-coef {
    font-weight: 600;
}

@keyframes statUpdate {
    0% { background-color: rgba(0, 0, 0, 0.1); }
    100% { background-color: transparent; }
}

.stat-updated {
    animation: statUpdate 0.5s ease;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    transition: var(--transition);
}

.match-header:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.round-info {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.score-board {
    display: flex;
    gap: 24px;
    font-size: 1rem;
}

.score.leading {
    font-weight: 600;
    color: var(--success-color);
    animation: pulse 1s infinite;
}

.timer {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin: 20px 0;
    transition: var(--transition);
    font-family: monospace;
}

.timer-warning {
    color: var(--warning-color);
    animation: pulse 1s infinite;
}

.timer-critical {
    color: var(--error-color);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.final-score {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    font-size: 2.5rem;
}

.score-big {
    font-size: 3rem;
    font-weight: 600;
    transition: var(--transition);
}

.score-big:hover {
    transform: scale(1.1);
}

.score-separator {
    font-size: 2.5rem;
    color: var(--text-secondary);
}

.opponent-status {
    text-align: center;
    margin: 20px 0;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.opponent-status:hover {
    transform: translateY(-2px);
}

.player-score {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.player-score:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.player-score.leading {
    background: var(--success-color);
    color: white;
}

.score-value {
    font-size: 1.2rem;
    font-weight: 600;
}

.score-name {
    font-size: 0.9rem;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.ripple:active:after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}