@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

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

:root {
    --bg-dark: #0A0B0E;
    --bg-card: rgba(20, 22, 27, 0.95);
    --bg-surface: #1A1D24;
    --accent-primary: #7357FF;
    --accent-secondary: #2B9BFF;
    --accent-gradient: linear-gradient(135deg, #7357FF, #2B9BFF);
    --text-primary: #FFFFFF;
    --text-secondary: #9BA1B0;
    --text-tertiary: #5D6370;
    --border-color: rgba(255, 255, 255, 0.08);
    --success: #27C46B;
    --error: #FF5F5F;
    --warning: #FFB259;
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.2);
    --blur-bg: blur(20px);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Анимированный фон */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb1 {
    width: 600px;
    height: 600px;
    background: #7357FF;
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb2 {
    width: 500px;
    height: 500px;
    background: #2B9BFF;
    bottom: -200px;
    left: -200px;
    animation-delay: -5s;
}

.orb3 {
    width: 400px;
    height: 400px;
    background: #FF5F5F;
    bottom: 50%;
    right: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, 50px) scale(1.1); }
    50% { transform: translate(0, 100px) scale(0.9); }
    75% { transform: translate(-50px, 50px) scale(1.05); }
}

.app {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
    z-index: 1;
}

/* Премиум хедер */
.header-glass {
    background: rgba(26, 29, 36, 0.8);
    backdrop-filter: var(--blur-bg);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 8px 20px rgba(115, 87, 255, 0.3);
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, #9BA1B0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-premium {
    font-size: 12px;
    padding: 4px 8px;
    background: rgba(115, 87, 255, 0.2);
    border: 1px solid rgba(115, 87, 255, 0.3);
    border-radius: 30px;
    color: var(--accent-primary);
}

/* Карточка баланса */
.balance-card {
    position: relative;
    cursor: pointer;
}

.balance-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--accent-gradient);
    border-radius: 30px;
    opacity: 0.3;
    filter: blur(5px);
    transition: 0.3s;
}

.balance-card:hover .balance-glow {
    opacity: 0.6;
    filter: blur(8px);
}

.balance-content {
    position: relative;
    background: var(--bg-surface);
    border-radius: 30px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: var(--blur-bg);
}

.balance-content i {
    color: var(--accent-primary);
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-label {
    font-size: 11px;
    color: var(--text-tertiary);
}

.balance-amount {
    display: flex;
    align-items: center;
    gap: 4px;
}

.amount {
    font-weight: 700;
    font-size: 18px;
    color: white;
}

.ton-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(43, 155, 255, 0.2);
    border: 1px solid rgba(43, 155, 255, 0.3);
    border-radius: 12px;
    color: var(--accent-secondary);
}

.arrow {
    font-size: 12px;
    color: var(--text-secondary);
    transition: 0.3s;
}

.balance-card:hover .arrow {
    transform: rotate(180deg);
}

/* Дропдаун кошелька */
.wallet-dropdown {
    position: absolute;
    top: 90px;
    right: 20px;
    width: 200px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px;
    backdrop-filter: var(--blur-bg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.15s;
}

.dropdown-item:hover {
    background: rgba(115, 87, 255, 0.1);
}

.dropdown-item i {
    width: 20px;
    color: var(--accent-primary);
}

.hidden {
    display: none;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(26, 29, 36, 0.6);
    backdrop-filter: var(--blur-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 16px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-card i {
    font-size: 24px;
    color: var(--accent-primary);
    background: rgba(115, 87, 255, 0.2);
    padding: 8px;
    border-radius: 16px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-weight: 700;
    font-size: 18px;
    color: white;
}

.stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Поиск */
.search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(26, 29, 36, 0.6);
    backdrop-filter: var(--blur-bg);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 4px 4px 4px 20px;
    margin-bottom: 16px;
}

.search-icon {
    color: var(--text-tertiary);
    font-size: 16px;
}

.search-container input {
    flex: 1;
    background: none;
    border: none;
    padding: 16px 0;
    color: white;
    font-size: 16px;
    outline: none;
}

.search-container input::placeholder {
    color: var(--text-tertiary);
}

.filter-toggle {
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 30px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}

.filter-toggle:hover {
    transform: rotate(90deg);
}

/* Панель фильтров */
.filters-panel {
    background: rgba(26, 29, 36, 0.8);
    backdrop-filter: var(--blur-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    animation: slideDown 0.2s ease;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.chip:hover {
    background: rgba(115, 87, 255, 0.1);
    border-color: var(--accent-primary);
}

.chip.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* Навигация */
.nav-tabs {
    display: flex;
    gap: 8px;
    background: rgba(26, 29, 36, 0.6);
    backdrop-filter: var(--blur-bg);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 6px;
    margin-bottom: 24px;
}

.nav-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 4px;
    border: none;
    background: transparent;
    border-radius: 34px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
}

.nav-tab i {
    font-size: 16px;
}

.nav-tab.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(115, 87, 255, 0.3);
}

.nav-badge {
    position: absolute;
    top: -4px;
    right: 10px;
    min-width: 18px;
    height: 18px;
    background: var(--error);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.nav-badge.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* Контент */
.content-area {
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Секции */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title i {
    color: var(--accent-primary);
}

/* Карточка NFT */
.nft-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.nft-card {
    background: var(--bg-card);
    backdrop-filter: var(--blur-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s;
}

.nft-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(115, 87, 255, 0.2);
}

.nft-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.nft-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.nft-card:hover .nft-image img {
    transform: scale(1.05);
}

.nft-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.5) 100%);
}

.nft-collection-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.nft-info {
    padding: 16px;
}

.nft-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nft-creator {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.nft-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nft-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.nft-price .price {
    font-weight: 700;
    font-size: 18px;
    color: white;
}

.nft-price .currency {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: 2px;
}

.nft-action {
    padding: 8px 16px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 30px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.nft-action:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(115, 87, 255, 0.4);
}

/* Featured карточка */
.featured-card {
    background: linear-gradient(135deg, rgba(115, 87, 255, 0.1), rgba(43, 155, 255, 0.1));
    backdrop-filter: var(--blur-bg);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 20px;
    margin-bottom: 24px;
}

.featured-content {
    display: flex;
    gap: 20px;
}

.featured-image {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-info {
    flex: 1;
}

.featured-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--accent-gradient);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 8px;
}

.featured-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.featured-creator {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.featured-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.featured-price small {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Инвентарь */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sell-mode-btn {
    padding: 10px 18px;
    background: rgba(39, 196, 107, 0.1);
    border: 1px solid rgba(39, 196, 107, 0.3);
    border-radius: 30px;
    color: var(--success);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.sell-mode-btn:hover {
    background: rgba(39, 196, 107, 0.2);
}

/* Профиль */
.profile-card {
    background: var(--bg-card);
    backdrop-filter: var(--blur-bg);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 24px;
    text-align: center;
}

.profile-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--accent-primary);
}

.edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

.profile-card h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.user-id {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-bottom: 20px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.profile-stat {
    display: flex;
    flex-direction: column;
}

.profile-stat .stat-value {
    font-size: 20px;
    font-weight: 700;
}

.profile-stat .stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.profile-menu-item:hover {
    background: rgba(115, 87, 255, 0.1);
}

.profile-menu-item i:first-child {
    color: var(--accent-primary);
}

.profile-menu-item span {
    flex: 1;
    text-align: left;
}

.profile-menu-item i:last-child {
    color: var(--text-tertiary);
    font-size: 12px;
}

/* Активность */
.activity-timeline {
    background: var(--bg-card);
    backdrop-filter: var(--blur-bg);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 20px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-icon {
    width: 48px;
    height: 48px;
    background: rgba(115, 87, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.timeline-content {
    flex: 1;
}

.timeline-content p {
    margin-bottom: 4px;
}

.timeline-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.timeline-amount {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Нижняя панель */
.action-bar {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: calc(100% - 32px);
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(26, 29, 36, 0.8);
    backdrop-filter: var(--blur-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
}

.action-btn {
    flex: 1;
    padding: 14px 0;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.quick-buy {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: white;
}

.quick-buy:hover {
    background: rgba(255, 255, 255, 0.1);
}

.create-btn {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(115, 87, 255, 0.3);
}

.create-btn:hover {
    transform: scale(1.02);
}

/* Модальное окно */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    width: 90%;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    overflow: hidden;
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(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: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
}

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

.modal-body {
    padding: 24px;
}

/* Тостер */
.toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    pointer-events: none;
}

.toast {
    padding: 14px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--blur-bg);
    animation: toastIn 0.3s ease;
}

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

/* Адаптивность */
@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-content {
        flex-direction: column;
    }
    
    .featured-image {
        width: 100%;
    }
}
