/* Google Fonts are already imported in HTML */
:root {
    /* Modern color palette with vibrant accent colors */
    --primary-color: #9d4edd;
    --primary-light: #c77dff;
    --primary-dark: #7b2cbf;
    --secondary-color: #ff7eb5;
    --secondary-light: #ffafcc;
    --secondary-dark: #f06292;
    --accent-color: #5390d9;
    --background-color: #f7f9fc;
    --card-background: #ffffff;
    --text-color: #2b2d42;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Glassmorphism */
    --glass-background: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --glass-blur: 8px;
    
    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    --gradient-accent: linear-gradient(45deg, #5e60ce, #5390d9, #4ea8de);
    --gradient-text: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

[data-theme="dark"] {
    --primary-color: #9d4edd;
    --primary-light: #c77dff;
    --primary-dark: #7b2cbf;
    --secondary-color: #ff7eb5;
    --secondary-light: #ffafcc;
    --secondary-dark: #f06292;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --text-color: #e0e0e0;
    --text-secondary: #afafaf;
    --border-color: #333333;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    
    /* Dark Mode Glassmorphism */
    --glass-background: rgba(30, 30, 30, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes blob-animation {
    0% {
        border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40%/50% 60% 30% 60%;
    }
    100% {
        border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Loading Animation */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--background-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    animation: spin 1.5s linear infinite;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-pig {
    animation: pulse 1.5s ease-in-out infinite;
    position: absolute;
}

.loader-text {
    margin-top: 150px;
    font-family: 'Comfortaa', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Background Animations */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.gradient-blob {
    position: absolute;
    filter: blur(40px);
    opacity: 0.4;
    animation: blob-animation 15s ease-in-out infinite;
}

.blob-1 {
    top: 10%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: var(--primary-light);
    animation-delay: 0s;
}

.blob-2 {
    bottom: 10%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: var(--secondary-light);
    animation-delay: -3s;
}

.blob-3 {
    top: 50%;
    right: 20%;
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    animation-delay: -6s;
}

.blob-4 {
    bottom: 30%;
    left: 20%;
    width: 300px;
    height: 300px;
    background: var(--primary-dark);
    animation-delay: -9s;
}

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

/* Glass Effect Styles */
.glass-effect {
    background: var(--glass-background);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 10px;
}

.glass-card {
    background: var(--glass-background);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Header Styles */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--glass-background);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--glass-shadow);
    z-index: 100;
    transition: all 0.4s ease;
}

.glass-header.scrolled {
    padding: 0.5rem 0;
    background: var(--glass-background);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
    flex-grow: 1;
    margin-left: 2rem;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.author {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: -5px;
}

.piggy-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 3s ease-in-out infinite;
}

/* Navigation */
.main-nav {
    position: relative;
}

/* Navigation Styles */
.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover, 
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after, 
.nav-link.active::after {
    width: 100%;
}

/* Auth Controls */
.auth-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--glass-background);
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--glass-shadow);
}

.auth-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    background-color: rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: rotate(15deg);
}

[data-theme="light"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

/* Hero Section */
.hero {
    padding-top: 8rem;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    position: relative;
    padding-bottom: 3rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-text-container {
    flex: 1;
    animation: fadeIn 1s ease-out;
}

.hero-title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-shift 5s ease infinite;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.piggy-illustration {
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.scroll-arrow {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: float 2s ease infinite;
    color: var(--primary-color);
    cursor: pointer;
}

/* Section Styles */
section {
    padding: 4rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.section-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

.decoration-line {
    height: 2px;
    width: 60px;
    background: var(--gradient-primary);
}

.decoration-icon {
    margin: 0 1rem;
    color: var(--secondary-color);
}

/* Card Styles */
.auth-required-card {
    background: var(--card-background);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    max-width: 500px;
    margin: 0 auto;
}

.card-illustration {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

.auth-message {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.data-form-card {
    background: var(--card-background);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
    max-width: 600px;
    margin: 0 auto;
}

.coefficient-card {
    background: var(--card-background);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    max-width: 600px;
    margin: 2rem auto 0;
}

.coefficient-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.coefficient-header h3 {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.piggy-badge {
    background: var(--gradient-primary);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border: none;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-gradient {
    background: var(--gradient-primary);
    color: white;
    background-size: 200% auto;
    transition: 0.5s;
}

.btn-gradient:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-glow {
    animation: pulse 1.5s infinite;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    margin-left: 0.5rem;
}

/* Стили для кнопок выбора типа */
.data-type-buttons {
    margin-bottom: 1.5rem;
}

.data-type-buttons h4 {
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.type-btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.type-btn {
    flex: 1;
    min-width: 90px;
    border: 1px solid var(--border-color);
    background: var(--card-background);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.type-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.type-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Form Styles */
.modern-form {
    width: 100%;
}

.floating-label {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-label input,
.floating-label select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.floating-label input:focus,
.floating-label select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label select:focus + label,
.floating-label select:not([value=""]) + label {
    transform: translateY(-120%) scale(0.8);
    color: var(--primary-color);
}

.floating-label label {
    position: absolute;
    left: 1rem;
    top: 0.7rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
    transform-origin: left top;
    font-size: 0.9rem;
}

.form-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.floating-label input:focus ~ .form-highlight,
.floating-label select:focus ~ .form-highlight {
    width: 100%;
}

/* Dropdown Styles (for select elements) */
.floating-label select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239d4edd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 0.8em;
    padding-right: 2.3rem;
    cursor: pointer;
}

.floating-label select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239d4edd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 15 12 9 6 15'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Coefficient Meter */
.coefficient-meter {
    margin-top: 1rem;
}

.meter-scale {
    height: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.meter-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    background: var(--gradient-primary);
    transition: width 1s ease;
}

.meter-value {
    text-align: right;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

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

.modal-content {
    width: 95%;
    max-width: 550px;
    padding: 1.5rem;
    border-radius: 15px;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

/* Стили для статичного модального окна профиля */
#profile-modal .modal-content {
    max-height: 80vh;
    overflow-y: auto;
    padding-top: 0.8rem;
}

#profile-modal .profile-card {
    margin-bottom: 0.75rem; 
    padding: 1rem;
}

#profile-modal .entries-section {
    margin-bottom: 0.75rem;
    padding: 1rem;
}

#profile-modal .profile-header {
    margin-bottom: 0.75rem;
}

#profile-modal .coefficient-details h4 {
    margin-bottom: 0.5rem;
}

#profile-modal .coefficient-grid {
    gap: 0.5rem;
    margin-top: 0.5rem;
}

#profile-modal .coefficient-item {
    padding: 0.5rem;
}

#profile-modal .coefficient-item.total {
    margin-top: 0.25rem;
}

.modal-sm {
    max-width: 450px;
}

.modal-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-header h2 {
    font-family: 'Comfortaa', sans-serif;
    font-size: 2rem;
    color: var(--primary-color);
}

.modal-header-mini {
    margin-bottom: 0.75rem;
    text-align: center;
}

.modal-header-mini h3 {
    font-family: 'Comfortaa', sans-serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.close {
    position: absolute;
    top: 0.8rem;
    right: 1.9rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    line-height: 1;
    z-index: 10;
}

.close:hover {
    color: var(--error-color);
    transform: rotate(90deg);
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.tab-btn:after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

.tab-btn.active:after {
    transform: scaleX(1);
}

.tab-btn:hover {
    color: var(--primary-color);
}

/* Profile Card */
.profile-card {
    background: var(--card-background);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease-out;
}

.profile-card:hover {
    /* Removed transform translateY animation */
    box-shadow: var(--box-shadow), 0 10px 20px rgba(0, 0, 0, 0.1);
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.profile-avatar {
    margin-right: 1.5rem;
    position: relative;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    object-fit: cover;
}

.user-avatar:hover {
    transform: scale(1.05);
}

/* Small avatar used in tables */
.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
    object-fit: cover;
    display: inline-block;
    text-align: center;
    line-height: 32px;
    font-size: 18px;
}

.avatar-change-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.profile-avatar:hover .avatar-change-btn {
    opacity: 1;
    transform: translateY(0);
}

.profile-name {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Checkbox Container Styles */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    line-height: 20px;
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.08);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.coefficient-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.coefficient-item {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.8rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.4s ease-out;
    transform-origin: center;
}

.coefficient-item:hover {
    /* Removed transform translateY animation */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.coefficient-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.coefficient-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.coefficient-item[data-type="standard"] {
    animation-delay: 0.1s;
    border-top: 3px solid #9d4edd;
}

.coefficient-item[data-type="event"] {
    animation-delay: 0.2s;
    border-top: 3px solid #ff7eb5;
}

.coefficient-item[data-type="weapon"] {
    animation-delay: 0.3s;
    border-top: 3px solid #5390d9;
}

.coefficient-item.total {
    grid-column: 1 / span 3;
    background: rgba(157, 78, 221, 0.05);
    border-left: 4px solid var(--primary-color);
    animation-delay: 0.4s;
    margin-top: 0.5rem;
}

.coefficient-value.highlight {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
}

/* Entries Section */
.entries-section {
    background: var(--card-background);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.entries-header {
    cursor: pointer;
    user-select: none;
}

.entries-section h3 {
    font-family: 'Comfortaa', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-entries {
    font-size: 14px;
    transition: transform 0.3s ease;
    margin-left: 10px;
    color: var(--text-secondary);
}

.toggle-entries.collapsed {
    transform: rotate(-90deg);
}

.entries-content {
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 300px;
    overflow: hidden;
    opacity: 1;
}

.entries-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.entries-list-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.entries-list {
    list-style: none;
    padding-left: 0;
}

.entries-list li {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.entries-list li:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Users Table */
.users-search {
    margin-bottom: 1rem;
}

.users-search input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.users-search input:focus {
    outline: none;
    border-bottom: 2px solid var(--primary-color);
}

.users-table,
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td,
.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.users-table th,
.admin-table th {
    background-color: rgba(0, 0, 0, 0.03);
    font-weight: 600;
    color: var(--primary-color);
}

.users-table tbody tr:hover,
.admin-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Align avatar and username horizontally in user list */
.users-table td:first-child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-delete {
    background-color: var(--error-color);
    color: white;
}

.btn-edit {
    background-color: var(--primary-color);
    color: white;
}

.btn-reset {
    background-color: var(--warning-color);
    color: white;
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Error */
.form-error {
    color: var(--error-color);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Footer */
.glass-footer {
    background: var(--glass-background);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-top: var(--glass-border);
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-mini {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Comfortaa', sans-serif;
    font-size: 0.9rem;
}

.footer-logo-text {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-social {
    display: none;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-text-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-logo,
    .footer-nav,
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-right {
        flex-direction: column;
        gap: 0.5rem;
    }

    .main-nav {
        position: relative;
    }
    
    .auth-controls {
        margin-top: 0.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .coefficient-grid {
        grid-template-columns: 1fr;
    }
    
    .coefficient-item.total {
        grid-column: span 1;
    }
}

@media (max-width: 576px) {
    .modal-content {
        width: 90%;
    }
    
    .btn-lg {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Animation Classes */
.animate-fadeIn {
    animation: fadeIn 1s ease-out;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Notification Styles */
@keyframes slideIn {
    from { transform: translate(-50%, -20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.message {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 9999;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease forwards;
    display: flex;
    align-items: center;
    max-width: 300px;
    text-align: center;
}

.message::before {
    content: "";
    margin-right: 8px;
    width: 16px;
    height: 16px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

.message-success {
    background: var(--success-color);
}

.message-success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22 4 12 14.01 9 11.01'%3E%3C/polyline%3E%3C/svg%3E");
}

.message-error {
    background: var(--error-color);
}

.message-error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
}

.message-info {
    background: var(--accent-color);
}

.message-info::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E");
}

.message-warning {
    background: var(--warning-color);
}

.message-warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3E%3C/path%3E%3Cline x1='12' y1='9' x2='12' y2='13'%3E%3C/line%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C/line%3E%3C/svg%3E");
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.avatar-option.selected {
    box-shadow: 0 0 0 3px var(--primary-color);
    transform: scale(1.05);
}
