:root {
    --primary-color: #2481cc;
    --secondary-color: #1a5a8e;
    --accent-color: #ff6b6b;
    --success-color: #51cf66;
    --background-dark: #0f1419;
    --background-light: #1a1f2e;
    --card-background: #212838;
    --text-primary: #ffffff;
    --text-secondary: #8b95a5;
    --border-color: #2d3748;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #2481cc, #1a5a8e);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--background-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-screen p {
    margin-top: 20px;
    color: var(--text-secondary);
}

/* Main Container */
.main-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--background-dark);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* User Profile Header - Улучшенный стиль */
.user-profile-header {
    background: var(--background-dark);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-balance {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.2;
    font-weight: 500;
}

.topup-balance-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-balance-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow);
    white-space: nowrap;
}

.btn-topup {
    background: var(--gradient-secondary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(36, 129, 204, 0.3);
    white-space: nowrap;
}

.btn-topup:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4);
}

/* Navigation Tabs - ВОССТАНОВЛЕННЫЙ СТИЛЬ */
.tabs {
    display: flex;
    background: #0a0e14;
    border-top: 1px solid #2d3342;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 6px;
    gap: 6px;
}

.tabs-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 0 auto;
    z-index: 100;
}

.tab {
    flex: 1;
    min-width: 56px;
    padding: 6px 6px;
    background: rgba(10, 14, 20, 0.98);
    border: none;
    border-radius: 18px;
    color: #bfc7d5;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 9px;
}

.tab-icon {
    font-size: 20px;
}

.tab.active {
    background: rgba(10, 14, 20, 0.98);
    color: #fff;
    border-radius: 18px;
}

.tab:hover {
    background: rgba(29, 78, 216, 0.1);
}

/* Pages */
.pages-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
}

.page {
    display: none;
    padding: 0;
    max-width: 100%;
    margin: 0;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Market Page */
.market-page {
    background: var(--background-dark);
}

/* NFT Grid - Улучшенный стиль */
.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    padding: 16px;
    margin-top: 0;
}

.nft-card {
    background: var(--card-background);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    width: 100%;
    height: 210px;
    position: relative;
    box-shadow: var(--shadow);
}

.nft-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid var(--border-color) !important;
    outline: none !important;
}

.nft-card-image-container {
    width: 100%;
    height: 120px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-light);
}

.nft-card-image-container img {
    width: 94%;
    height: 90%;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.nft-card:hover .nft-card-image-container img {
    transform: scale(1.05);
    border-color: var(--border-color);
}

.nft-card-content {
    padding: 10px 12px;
    background: var(--card-background);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 90px;
    position: relative;
}

.nft-info-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
}

.nft-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    text-align: left;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nft-card-id {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 0;
    text-align: left;
    width: 100%;
    font-weight: 400;
}

.price-main {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

/* ИСПРАВЛЕННЫЙ СТИЛЬ КНОПКИ ПОКУПКИ - ВОЗВРАЩАЕМ ТЕЛЕЖКУ */
.btn-buy-icon {
    position: absolute;
    bottom: 12px;
    right: 8px;
    width: 38px;
    height: 38px;
    background: #1d4ed8 !important;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.5);
    z-index: 10;
    transform: scaleX(1);
    filter: contrast(1.1);
}

.btn-buy-icon:hover {
    transform: scaleX(1) scale(1.05);
    box-shadow: 0 3px 12px rgba(29, 78, 216, 0.7);
    background: #1e40af !important;
}

.cart-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.cart-img-large {
    width: 28px;
    height: 28px;
}

.cart-img-flip {
    transform: scaleX(-1);
}

/* Inventory Page - ИСПРАВЛЕННАЯ ВЕРСИЯ */
.inventory-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    padding: 16px;
}

.inventory-card {
    background: var(--card-background);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    height: 300px;
    display: flex;
    flex-direction: column;
}

.inventory-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* УВЕЛИЧЕННОЕ ИЗОБРАЖЕНИЕ NFT */
.inventory-card-media {
    width: 100%;
    height: 200px; /* Увеличено с 140px */
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-light);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.inventory-card-image {
    width: 94% !important;
    height: 94% !important;
    object-fit: contain !important;
    display: block;
    padding: 8px;
    border-radius: 12px;
}

.inventory-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-size: 80px; /* Увеличенный эмодзи */
}

.inventory-cart-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* КОМПАКТНОЕ ТЕКСТОВОЕ ПОЛЕ */
.inventory-card-body {
    padding: 12px 14px;
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

.inventory-item-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    color: var(--text-primary);
    line-height: 1.2;
}

.inventory-item-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-align: left;
    line-height: 1.2;
}

/* БЕЛАЯ ЦЕНА */
.inventory-item-price {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 8px;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-align: left;
    line-height: 1.2;
}

.inventory-item-price .ton {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 400;
}

.inventory-qty {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #f2994a;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* Page Headers */
.page-header {
    text-align: center;
    padding: 24px 20px 16px;
    background: var(--background-dark);
    border-bottom: 1px solid var(--border-color);
}

.page-header h2 {
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Info Card */
.info-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin: 16px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--background-light);
    border-radius: 20px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
}

/* Auth Modal - Fullscreen Style */
#auth-modal {
    background: linear-gradient(180deg, #1a1f2e 0%, #0f1419 100%);
    backdrop-filter: none;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

#auth-modal .modal-content {
    background: #1e2533;
    border-radius: 20px;
    padding: 40px 28px 32px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin: 0;
    animation: modalSlideIn 0.3s ease;
}

/* Auth Step 1 */
.auth-logo-placeholder {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #2481cc, #1a5a8e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.auth-welcome {
    text-align: center;
    font-size: 18px;
    font-weight: 400;
    color: #a8b3c5;
    margin-bottom: 8px;
}

.auth-brand {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.brand-market {
    color: #ff6b9d;
}

.brand-tochka {
    color: #4fc3f7;
}

.auth-description {
    text-align: center;
    font-size: 14px;
    color: #8b95a5;
    line-height: 1.6;
    margin-bottom: 32px;
}

.btn-telegram-auth {
    width: 100%;
    padding: 16px;
    background: #2a9fdf;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    transition: background 0.3s ease;
}

.btn-telegram-auth:hover {
    background: #2488c7;
}

.btn-telegram-auth .telegram-icon {
    font-size: 18px;
}

.telegram-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    margin-right: 2px;
}

.btn-back-market {
    width: 100%;
    padding: 16px 20px;
    background: #1a2332;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.btn-back-market:hover {
    background: #212a3b;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-logo {
    width: 120px;
    margin-bottom: 16px;
}

.modal-header h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.brand-name {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: rotate(90deg);
}

/* Auth Steps */
.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.step-info {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.step-info strong {
    color: var(--text-primary);
    display: block;
    margin-top: 4px;
    font-size: 16px;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.phone-input-group {
    display: flex;
    gap: 8px;
}

.country-code-select {
    width: 100px;
    padding: 12px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-code-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(36, 129, 204, 0.1);
}

.phone-input,
.code-input,
.password-input {
    flex: 1;
    width: 100%;
    padding: 12px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.phone-input:focus,
.code-input:focus,
.password-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(36, 129, 204, 0.1);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 12px rgba(36, 129, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(36, 129, 204, 0.4);
}

.btn-secondary {
    background: var(--card-background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--background-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-telegram {
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-icon {
    font-size: 18px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 15px;
}

/* Success */
.success-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

.success-message {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 10px;
    font-size: 14px;
}

.nft-detail {
    max-width: 420px;
}

.nft-detail-image {
    width: 100%;
    height: 320px !important; /* Увеличено */
    min-height: 320px !important;
    background: var(--card-background);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.nft-detail-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 16px;
}

.nft-detail-info h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
    text-align: center;
}

.nft-detail-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--card-background);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.meta-item {
    text-align: center;
}

.meta-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

/* БЕЛАЯ ЦЕНА В МОДАЛКЕ */
.meta-value {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Стили для кнопки Вывести */
.btn-withdraw {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 16px;
    box-shadow: 0 4px 12px rgba(36, 129, 204, 0.3);
}

.btn-withdraw:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(36, 129, 204, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .inventory-content {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
        padding: 12px;
    }
    
    .inventory-card {
        height: 280px;
    }
    
    .inventory-card-media {
        height: 180px;
        min-height: 180px;
    }
    
    .inventory-card-placeholder {
        font-size: 60px;
    }
    
    .nft-detail-image {
        height: 280px !important;
        min-height: 280px !important;
    }
}

/* Scrollbar Styling */
.pages-container::-webkit-scrollbar {
    width: 6px;
}

.pages-container::-webkit-scrollbar-track {
    background: var(--background-dark);
}

.pages-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.pages-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Smooth transitions for all interactive elements */
.nft-card,
.inventory-card,
.btn,
.tab,
.modal-close {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced focus states for accessibility */
.btn:focus,
.tab:focus,
.modal-close:focus,
.phone-input:focus,
.code-input:focus,
.password-input:focus,
.country-code-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Gradient backgrounds for different card types */
.nft-card:nth-child(4n+1) .nft-card-image-container {
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3342 100%);
}

.nft-card:nth-child(4n+2) .nft-card-image-container {
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3748 100%);
}

.nft-card:nth-child(4n+3) .nft-card-image-container {
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3342 100%);
}

.nft-card:nth-child(4n+4) .nft-card-image-container {
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3748 100%);
}

/* Убираем синюю обводку при наведении на карточки */
.nft-card:hover,
.nft-card:focus,
.nft-card:active {
    outline: none !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5) !important;
    border-color: var(--border-color) !important;
}

.inventory-card:hover,
.inventory-card:focus,
.inventory-card:active {
    outline: none !important;
    border-color: var(--border-color) !important;
}

/* Отключаем все возможные outline и border изменения */
.nft-card *:focus,
.inventory-card *:focus {
    outline: none !important;
}

/* Убираем любые transition для border и outline */
.nft-card,
.inventory-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* ФИКСИРОВАННЫЕ СТИЛИ ТОЛЬКО ДЛЯ ИНВЕНТАРЯ */

/* УВЕЛИЧЕНИЕ ИЗОБРАЖЕНИЙ В ИНВЕНТАРЕ */
.inventory-card-media {
    height: 200px !important;
    min-height: 200px !important;
}

.inventory-card-image {
    width: 94% !important;
    height: 94% !important;
    object-fit: contain !important;
}

/* УВЕЛИЧЕНИЕ ИЗОБРАЖЕНИЯ В МОДАЛКЕ ИНВЕНТАРЯ */
.nft-detail-image {
    height: 320px !important;
    min-height: 320px !important;
}

.nft-detail-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* БЕЛЫЙ ЦВЕТ ДЛЯ ЦЕН В ИНВЕНТАРЕ */
.inventory-item-price,
.inventory-card-body .inventory-item-price,
.nft-detail-meta .meta-value {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* УВЕЛИЧЕНИЕ РАЗМЕРА КАРТОЧЕК ИНВЕНТАРЯ */
.inventory-card {
    height: 300px !important;
    min-height: 300px !important;
}

/* УВЕЛИЧЕНИЕ ШРИФТА ЦЕН В ИНВЕНТАРЕ */
.inventory-item-price {
    font-size: 16px !important;
}

.meta-value {
    font-size: 16px !important;
}

/* АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ (ТОЛЬКО ИНВЕНТАРЬ) */
@media (max-width: 480px) {
    .inventory-card-media {
        height: 180px !important;
    }
    
    .nft-detail-image {
        height: 280px !important;
    }
    
    .inventory-card {
        height: 280px !important;
    }
}

/* ВОССТАНОВЛЕНИЕ ОРИГИНАЛЬНЫХ СТИЛЕЙ МАРКЕТА */
.nft-card-image-container {
    height: 140px !important;
}

.nft-card {
    height: 240px !important;
}

.nft-card-content {
    height: 100px !important;
}

.price-main {
    font-size: 15px !important;
}

/* Auth Modal Fullscreen */
#auth-modal .modal-header { text-align: center; margin-bottom: 32px; }
.btn-telegram { background: var(--primary-color); display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-icon { font-size: 20px; }
.divider { display: flex; align-items: center; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }
.divider span { padding: 0 16px; font-size: 14px; }


/* Auth Modal Fullscreen */
#auth-modal .modal-header { text-align: center; margin-bottom: 32px; }
.btn-telegram { background: var(--primary-color); display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-icon { font-size: 20px; }


/* Auth Back Buttons */
.btn-back-arrow {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 0;
    margin-bottom: 20px;
    cursor: pointer;
    transition: color 0.2s;
    width: 100%;
    text-align: left;
}

.btn-back-arrow-main {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    padding: 16px;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.btn-back-arrow:hover {
    color: var(--secondary-color);
}

.btn-back-arrow-main:hover {
    background: var(--border-color);
    border-color: var(--primary-color);
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.telegram-icon {
    font-size: 20px;
}

/* Auth Verify Page */
.auth-verify-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.auth-verify-description {
    font-size: 14px;
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

.verification-code-input {
    width: 100%;
    padding: 18px;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 8px;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.verification-code-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(36, 129, 204, 0.15);
}

.verification-code-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.resend-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin: 16px 0 8px;
}

.btn-resend {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px;
    margin-bottom: 24px;
    width: 100%;
    transition: all 0.2s ease;
}

.btn-resend:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Notifications */
.notification {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Password Input Styling */
.password-input {
    width: 100%;
    padding: 18px;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.password-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(36, 129, 204, 0.15);
}

.password-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Auth Step 3 Specific Styles */
#auth-step-3 .auth-verify-description {
    font-size: 14px;
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}
