/* Font Definitions */
@font-face {
    font-family: 'Stem';
    src: url('/static/fonts/Stem-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Stem';
    src: url('/static/fonts/Stem-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Stem';
    src: url('/static/fonts/Stem-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Stem';
    src: url('/static/fonts/Stem-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Цветовая палитра */
:root {
    --primary-yellow: #ffaa00; /* Оранжевый RGB: 255-170-0 */
    --primary-orange: #ee7100; /* Охра RGB: 238-113-0 */
    --primary-blue: #173ba2; /* Синий RGB: 23-59-162 */
    --light-blue: #66aeff; /* Голубой RGB: 102-174-255 */
    --accent-blue: #66aeff; /* Голубой RGB: 102-174-255 */
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --white: #ffffff;
}

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

body {
    font-family: 'Stem', system-ui, -apple-system, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(to bottom, #ffaa00, #ee7100); /* Градиент от оранжевого к охре */
    min-height: 100vh;
    color: var(--primary-blue);
    line-height: 1.6;
    padding-top: 80px; /* Отступ для фиксированного хедера */
    font-weight: 400; /* Основной вес шрифта - Regular */
}

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

/* Modern Fixed Header */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffaa00; /* Оранжевый фон */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* Темная рамка для контраста */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2); /* Темная тень */
    z-index: 1000;
    padding: 0;
}


.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

/* Logo Section */
.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-image {
    width: 52px;
    height: 52px;
    border-radius: 20px; /* Больше закругленные поля */
    object-fit: cover;
    box-shadow: 0 3px 12px rgba(23, 59, 162, 0.15);
    /* Убрали transition для неинтерактивности */
}

/* Логотип теперь неинтерактивный - убрали hover эффект */

.logo-text {
    display: none; /* Убираем текст логотипа */
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    justify-content: flex-start;
    margin-left: 25px;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(to right, var(--primary-blue), var(--primary-blue)) !important; /* Однородный градиент для плавного перехода */
    color: white !important;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(23, 59, 162, 0.2);
    white-space: nowrap;
}

.nav-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(23, 59, 162, 0.3);
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue)) !important; /* Градиент слева направа: голубой к синему */
}

.nav-item.active {
    background: var(--primary-blue); /* Активное состояние - тот же синий */
    color: white;
    box-shadow: 0 2px 10px rgba(23, 59, 162, 0.4); /* Более яркая тень для активного */
}

.nav-item.active:hover {
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue)); /* Тот же градиент при hover */
    box-shadow: 0 4px 15px rgba(23, 59, 162, 0.4);
}

/* Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* User Balance */
.user-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ee7100 !important; /* Охра RGB: 238-113-0 */
    color: white !important;
    padding: 10px 20px; /* Увеличили padding */
    border-radius: 25px; /* Увеличили закругление */
    font-weight: bold;
    font-size: 1rem; /* Увеличили шрифт */
    box-shadow: 0 3px 15px rgba(238, 113, 0, 0.3); /* Усилили тень */
    white-space: nowrap;
    transition: all 0.3s ease;
}

.user-balance:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(238, 113, 0, 0.4);
}

.balance-amount {
    font-weight: bold;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username {
    color: white; /* Белый текст для лучшей читаемости на охровом фоне */
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); /* Легкая тень для лучшей читаемости */
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 18px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    background: linear-gradient(to right, var(--primary-blue), var(--primary-blue)) !important; /* Однородный градиент для плавного перехода */
    color: white !important;
}

.login-btn {
    background: linear-gradient(to right, var(--primary-blue), var(--primary-blue)) !important; /* Однородный градиент для плавного перехода */
    color: white !important;
    box-shadow: 0 2px 8px rgba(23, 59, 162, 0.3);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 59, 162, 0.4);
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue)) !important; /* Градиент слева направа: голубой к синему */
}

.register-btn {
    background: linear-gradient(to right, var(--primary-blue), var(--primary-blue)) !important; /* Однородный градиент для плавного перехода */
    color: white !important;
    box-shadow: 0 2px 8px rgba(23, 59, 162, 0.3);
}

.register-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 59, 162, 0.4);
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue)) !important; /* Градиент слева направа: голубой к синему */
}

.logout-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, #c82333, #bd2130);
}

/* Active state for auth buttons */
.auth-btn.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--light-blue)) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(102, 174, 255, 0.3) !important;
}

.auth-btn.active:hover {
    background: linear-gradient(135deg, var(--light-blue), var(--primary-blue)) !important;
    box-shadow: 0 4px 12px rgba(102, 174, 255, 0.4) !important;
}

/* Old header styles - kept for backward compatibility */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(23, 59, 162, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    color: var(--primary-blue);
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(to right, var(--primary-blue), var(--primary-blue)) !important; /* Однородный градиент для плавного перехода */
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(23, 59, 162, 0.3);
}

.nav-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 59, 162, 0.4);
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue)); /* Градиент слева направа: голубой к синему */
}

/* Form Styles */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin: 0 auto;
    max-width: 500px;
    box-shadow: 0 15px 35px rgba(23, 59, 162, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-container h1 {
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 1.1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--accent-blue);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 10px rgba(238, 113, 0, 0.3);
    transform: translateY(-1px);
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(to right, var(--primary-blue), var(--primary-blue)) !important; /* Однородный градиент для плавного перехода */
    color: white !important;
    text-decoration: none;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(23, 59, 162, 0.3);
    width: 100%;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(23, 59, 162, 0.4);
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue)) !important; /* Градиент слева направа: голубой к синему */
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.product-image-container {
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 15px;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease;
}

.product:hover .product-image {
    transform: scale(1.05);
}

.product {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(23, 59, 162, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(23, 59, 162, 0.2);
}

.product h2 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.5rem;
    white-space: nowrap;       /* в одну строку */
    overflow: hidden;          /* обрезать лишнее */
    text-overflow: ellipsis;   /* многоточие как крайний случай */
}

.product p {
    margin-bottom: 15px;
    color: var(--dark-gray);
    line-height: 1.6;
}

.price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-orange);
    margin-bottom: 20px;
}

.btn-buy {
    padding: 12px 25px;
    background: linear-gradient(to right, var(--primary-blue), var(--primary-blue)) !important; /* Однородный градиент для плавного перехода */
    color: white !important;
    border: none;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(23, 59, 162, 0.3);
    width: 100%;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 59, 162, 0.4);
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue)) !important; /* Градиент слева направа: голубой к синему */
}

/* Отключенная кнопка "Нет в наличии" */
.btn-buy:disabled,
.btn-buy[disabled] {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.btn-buy:disabled:hover,
.btn-buy[disabled]:hover {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Кнопка для не авторизованных пользователей */
.btn-buy-login {
    padding: 12px 25px;
    background: var(--primary-blue) !important;
    color: white !important;
    border: none;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(23, 59, 162, 0.3);
    width: 100%;
    text-decoration: none !important;
    text-align: center !important;
    display: block;
}

.btn-buy-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 59, 162, 0.4);
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue)) !important;
    text-decoration: none !important;
}

/* Hamburger Menu Styles */
.hamburger-menu {
    position: relative;
    display: inline-block;
}

.hamburger-btn {
    background: var(--primary-blue) !important;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(23, 59, 162, 0.3);
    position: relative; /* для позиционирования бейджа */
}

.hamburger-btn:hover {
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue)) !important;
    box-shadow: 0 4px 12px rgba(23, 59, 162, 0.4);
    transform: translateY(-1px);
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

/* Анимация кнопки при открытии */
.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Popup Menu */
.popup-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 10px 0;
}

.popup-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.popup-item {
    display: block;
    padding: 12px 20px;
    color: var(--primary-blue) !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px 8px;
}

.popup-item:hover {
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue));
    color: white !important;
    transform: translateX(5px);
}

.popup-item.active {
    background: var(--primary-blue);
    color: white !important;
}

.popup-item.logout {
    color: #dc3545 !important;
}

.popup-item.logout:hover {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white !important;
}

.popup-separator {
    border: none;
    height: 1px;
    background: rgba(23, 59, 162, 0.2);
    margin: 8px 15px;
}

/* Cart badge with number */
.cart-badge-number {
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    min-width: 18px !important;
    width: auto !important;
    height: 18px !important;
    padding: 0 5px !important;
    background: var(--primary-orange) !important;
    color: white !important;
    border-radius: 9px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(238,113,0,0.4) !important;
    z-index: 10 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    border: none !important;
    margin: 0 !important;
    transform: none !important;
    transition: none !important;
}

/* для пунктов меню - просто красная точка */
.popup-item { position: relative; }
.badge-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #dc3545;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(220,53,69,0.4);
    top: 8px;
    right: 10px;
}

/* Profile Button Styles */
.profile-btn, .overcoin-btn {
    background: none !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
}

.profile-btn:hover, .overcoin-btn:hover {
    background: linear-gradient(to right, var(--light-blue), var(--primary-blue)) !important;
    color: white !important;
    transform: translateX(5px);
}

/* Profile Modal Styles */
.profile-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.profile-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.profile-modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
    color: white;
}

.profile-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
}

.profile-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.profile-modal-body {
    padding: 25px 30px;
}

.profile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(23, 59, 162, 0.1);
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-field label {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1rem;
    min-width: 140px;
}

.profile-field span {
    font-weight: 500;
    color: var(--dark-gray);
    text-align: right;
    flex: 1;
}

.profile-field .admin-role {
    color: var(--primary-orange);
    font-weight: bold;
    padding: 4px 12px;
    background: rgba(238, 113, 0, 0.1);
    border-radius: 15px;
    font-size: 0.9rem;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive для профиля */
@media (max-width: 480px) {
    .profile-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .profile-modal-header {
        padding: 15px 20px;
    }
    
    .profile-modal-header h2 {
        font-size: 1.1rem;
    }
    
    .profile-modal-body {
        padding: 20px;
    }
    
    .profile-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .profile-field label {
        min-width: auto;
    }
    
    .profile-field span {
        text-align: left;
    }
}

/* Admin Panel */
.admin-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(23, 59, 162, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-section h2 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 120px; /* Увеличенный отступ для мобильного хедера */
    }
    
    .header-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .header-logo {
        justify-content: center;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .header-nav {
        order: 3;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    
    .nav-item {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .header-right {
        order: 2;
        flex-direction: column;
        gap: 10px;
    }
    
    .user-balance {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .username {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .auth-buttons {
        justify-content: center;
        gap: 6px;
    }
    
    .auth-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
    }
    
    .form-container {
        padding: 25px;
        margin: 0 15px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Маленькие экраны */
@media (max-width: 480px) {
    .header-container {
        padding: 12px 15px;
    }
    
    .logo-image {
        width: 32px;
        height: 32px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .nav-item {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .user-balance {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .auth-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}


@keyframes spin {
    to { transform: rotate(360deg); }
}

/* OverCoins Image Styling - Force sizing (20% larger) */
img[src*="coin.png"] {
    width: 1.2em !important;
    height: 1.2em !important;
    display: inline-block !important;
    vertical-align: -0.15em !important;
    margin-right: 0.15em !important;
    margin-left: 0 !important;
    object-fit: contain !important;
    max-width: 1.2em !important;
    max-height: 1.2em !important;
    min-width: 1.2em !important;
    min-height: 1.2em !important;
}

img[src*="coin.png"].large,
img.OverCoins-icon.large {
    width: 1.44em !important;
    height: 1.44em !important;
    max-width: 1.44em !important;
    max-height: 1.44em !important;
    min-width: 1.44em !important;
    min-height: 1.44em !important;
    vertical-align: -0.18em !important;
    margin-right: 0.15em !important;
}

img[src*="coin.png"].small,
img.OverCoins-icon.small {
    width: 1.08em !important;
    height: 1.08em !important;
    max-width: 1.08em !important;
    max-height: 1.08em !important;
    min-width: 1.08em !important;
    min-height: 1.08em !important;
    vertical-align: -0.12em !important;
    margin-right: 0.15em !important;
}

/* Additional specific selectors */
img.OverCoins-icon {
    width: 1.2em !important;
    height: 1.2em !important;
    display: inline-block !important;
    vertical-align: -0.15em !important;
    margin-right: 0.15em !important;
    margin-left: 0 !important;
    object-fit: contain !important;
    max-width: 1.2em !important;
    max-height: 1.2em !important;
    min-width: 1.2em !important;
    min-height: 1.2em !important;
}

/* Большая иконка монеты для баланса */
.user-balance img.OverCoins-icon {
    width: 1.5em !important;
    height: 1.5em !important;
    max-width: 1.5em !important;
    max-height: 1.5em !important;
    min-width: 1.5em !important;
    min-height: 1.5em !important;
    vertical-align: -0.2em !important;
    margin-right: 0.2em !important;
}

/* Image Modal Styles */
#imageModal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

#modalImage {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

#closeModal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

#closeModal:hover {
    color: #ccc;
}
