/* ============================
   Reset & Base Styles
   ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Blue Theme Colors */
    --primary-blue: #2563eb;
    --primary-blue-dark: #1e40af;
    --primary-blue-light: #3b82f6;
    --secondary-blue: #0284c7;
    --accent-blue: #06b6d4;
    
    /* Background Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    
    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Accent Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
    --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* ============================
       LIQUID GLASS EFFECT
       ============================ */
    /* Glass Background Colors (полупрозрачные) */
    --glass-bg-primary: rgba(30, 41, 59, 0.7);
    --glass-bg-secondary: rgba(51, 65, 85, 0.6);
    --glass-bg-card: rgba(30, 41, 59, 0.65);
    --glass-bg-hover: rgba(51, 65, 85, 0.75);
    --glass-bg-light: rgba(241, 245, 249, 0.05);
    
    /* Glass Borders */
    --glass-border: rgba(241, 245, 249, 0.1);
    --glass-border-hover: rgba(241, 245, 249, 0.2);
    
    /* Glass Shadows */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-shadow-hover: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
    --glass-glow: 0 0 30px rgba(37, 99, 235, 0.3);
    
    /* Blur strength */
    --glass-blur: blur(12px);
    --glass-blur-strong: blur(20px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================
   LIQUID GLASS UTILITY CLASSES
   ============================ */
.glass {
    background: var(--glass-bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-strong {
    background: var(--glass-bg-primary);
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass:hover, .glass-hover:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--glass-shadow-hover);
    transform: translateY(-2px);
}

.glass-glow {
    box-shadow: var(--glass-shadow), var(--glass-glow);
}

/* ============================
   Loading Screen
   ============================ */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-out 1s forwards;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-secondary);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* ============================
   App Container
   ============================ */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    padding-bottom: 80px;
}

/* Увеличенное окно для ПК */
@media (min-width: 1024px) {
    .app-container {
        max-width: 900px;
    }
    
    .bottom-nav {
        max-width: 900px;
    }
}

/* ============================
   Header
   ============================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg-primary);
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 1rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-full);
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-stats-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.1);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-lg);
    font-size: 0.813rem;
    font-weight: 600;
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
    transition: all var(--transition-base);
}

.admin-stats-counter:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

.admin-stats-counter i {
    font-size: 0.938rem;
}

.stats-separator {
    color: rgba(34, 197, 94, 0.6);
    font-weight: 500;
}

/* === Экран первоначальной загрузки WebApp === */
.app-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(at 20% 20%, rgba(37, 99, 235, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 80%, rgba(6, 182, 212, 0.15) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(59, 130, 246, 0.1) 0px, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease-out;
}

.app-loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.app-loading-content {
    text-align: center;
    max-width: 400px;
    width: 90%;
    padding: 2rem;
}

.app-loading-duck {
    width: 180px;
    height: 180px;
    margin: 0 auto 2rem;
    border-radius: 1.5rem;
    overflow: hidden;
    background: var(--bg-secondary);
    padding: 1.5rem;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(37, 99, 235, 0.2),
        0 0 20px rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-loading-duck img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
}

.app-loading-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

.app-loading-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    min-height: 1.5rem;
    font-weight: 500;
}

.app-loading-progress-container {
    background: var(--bg-secondary);
    border-radius: 1rem;
    height: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(37, 99, 235, 0.2);
}

.app-loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue), var(--primary-blue));
    background-size: 200% 100%;
    border-radius: 1rem;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: loading-shimmer 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.app-loading-percentage {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.app-loading-hint {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-left: 3px solid var(--primary-blue);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: left;
    transition: opacity 0.5s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.app-loading-hint i {
    color: var(--primary-blue);
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* === Progress Bar для загрузки чека === */
.upload-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.upload-progress-container {
    background: var(--bg-primary);
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.upload-progress-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.upload-progress-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-upload 1.5s ease-in-out infinite;
}

.upload-progress-icon i {
    font-size: 1.75rem;
    color: white;
}

@keyframes pulse-upload {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.upload-progress-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-progress-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.upload-progress-bar-container {
    background: rgba(16, 185, 129, 0.1);
    border-radius: 1rem;
    height: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669, #10b981);
    background-size: 200% 100%;
    border-radius: 1rem;
    transition: width 0.3s ease;
    animation: progress-shimmer 1.5s ease-in-out infinite;
}

@keyframes progress-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.upload-progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.upload-progress-spinner {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.upload-progress-spinner span {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: bounce-spinner 1.4s ease-in-out infinite;
}

.upload-progress-spinner span:nth-child(1) {
    animation-delay: -0.32s;
}

.upload-progress-spinner span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce-spinner {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.btn-icon:hover {
    background: var(--bg-hover);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error);
    color: white;
    border-radius: var(--radius-full);
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* ============================
   Main Content
   ============================ */
.main-content {
    padding: 1rem;
}

.page {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.page.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   Welcome Section
   ============================ */
.welcome-section {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 1rem;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    animation: fadeInDown 0.6s ease-out;
}

.gradient-text {
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    animation: fadeInDown 0.6s ease-out 0.1s backwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   Quick Actions
   ============================ */
.quick-actions {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    background: var(--glass-bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    animation: fadeInUp 0.5s ease-out backwards;
}

.action-card:nth-child(1) { animation-delay: 0.1s; }
.action-card:nth-child(2) { animation-delay: 0.2s; }
.action-card:nth-child(3) { animation-delay: 0.3s; }
.action-card:nth-child(4) { animation-delay: 0.4s; }

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow-hover), var(--glass-glow);
    border-color: var(--glass-border-hover);
    background: var(--glass-bg-hover);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.action-icon.free {
    background: var(--gradient-cyan);
}

.action-card:hover .action-icon {
    transform: scale(1.1) rotate(5deg);
}

.action-content {
    flex: 1;
}

.action-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.action-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.action-card > .fa-chevron-right {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all var(--transition-base);
}

.action-card:hover > .fa-chevron-right {
    color: var(--primary-blue);
    transform: translateX(5px);
}

/* ============================
   Stats Overview
   ============================ */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-base);
    animation: scaleIn 0.5s ease-out backwards;
}

.stat-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--glass-shadow-hover);
    border-color: var(--glass-border-hover);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================
   Page Header
   ============================ */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.btn-back {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-back:hover {
    background: var(--primary-blue);
    transform: translateX(-5px);
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================
   Search Bar
   ============================ */
.search-bar {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-bar input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--bg-card);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

/* ============================
   Networks & Services List
   ============================ */
.networks-list,
.categories-list,
.services-list {
    display: grid;
    gap: 0.75rem;
}

.network-item,
.category-item,
.service-item {
    background: var(--glass-bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    animation: slideInLeft 0.4s ease-out backwards;
}

.network-item:nth-child(n) { animation-delay: calc(0.05s * var(--i, 1)); }

.network-item:hover,
.category-item:hover,
.service-item:hover {
    transform: translateX(5px) translateY(-2px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--glass-shadow-hover), var(--glass-glow);
    background: var(--glass-bg-hover);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.network-info,
.category-info,
.service-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.network-icon {
    font-size: 1.8rem;
}

/* Круглые иконки соцсетей */
.network-icon-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    border: 2px solid rgba(37, 99, 235, 0.1);
    transition: all var(--transition-base);
    background: white;
    padding: 2px;
}

.network-icon-img:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: scale(1.05);
}

/* Lazy loading изображений */
.network-icon-img.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.network-icon-img.lazy-image[src*="base64"] {
    background: var(--bg-secondary);
}

/* Анимация появления после загрузки */
.network-icon-img:not(.lazy-image) {
    opacity: 1;
}

.service-info .network-icon-img {
    width: 32px;
    height: 32px;
    margin-right: 0.75rem;
    border: 1.5px solid rgba(37, 99, 235, 0.08);
}

.network-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.network-icon-emoji {
    font-size: 1.5rem;
}

.network-name,
.category-name,
.service-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.service-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.price-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================
   Service Detail
   ============================ */
.service-detail {
    animation: fadeInUp 0.4s ease-out;
}

.service-detail-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.service-detail-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.service-detail-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.service-detail-category {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.service-detail-info {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(37, 99, 235, 0.05);
    border-radius: var(--radius-sm);
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

.order-form {
    display: grid;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-summary {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--primary-blue);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-label {
    color: var(--text-secondary);
}

.summary-value {
    color: var(--text-primary);
    font-weight: 600;
}

.summary-total {
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.summary-total .summary-value {
    font-size: 1.2rem;
    color: var(--accent-blue);
}

/* ============================
   Buttons
   ============================ */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 1rem;
    background: var(--glass-bg-secondary);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--glass-shadow);
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--glass-shadow-hover);
    transform: translateY(-2px);
}

/* ============================
   Orders List
   ============================ */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-tab {
    padding: 0.625rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.filter-tab:hover {
    background: var(--bg-hover);
}

.filter-tab.active {
    background: var(--gradient-blue);
    color: white;
    border-color: transparent;
}

.orders-list {
    display: grid;
    gap: 1rem;
}

.order-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    transition: all var(--transition-base);
    cursor: pointer;
    animation: fadeInUp 0.4s ease-out backwards;
}

.order-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.order-id {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.order-status {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.order-status.processing {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.order-status.completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.order-status.failed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.order-service {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.order-details {
    display: grid;
    gap: 0.5rem;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.order-detail-label {
    color: var(--text-muted);
}

.order-detail-value {
    color: var(--text-secondary);
    font-weight: 500;
}

.order-price {
    color: var(--accent-blue) !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
}

/* ============================
   Free Services
   ============================ */
.cooldown-info {
    background: var(--glass-bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-base);
}

.cooldown-info i {
    font-size: 1.5rem;
    color: var(--accent-blue);
    transition: transform var(--transition-base);
}

/* Состояние проверки (загрузка) */
.cooldown-info.checking {
    background: var(--glass-bg-card);
    border-color: var(--accent-blue);
}

.cooldown-info.checking i {
    animation: spin 1s linear infinite;
}

/* Доступно */
.cooldown-info.ready {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.cooldown-info.ready i {
    color: var(--success);
    animation: pulse-success 2s ease-in-out infinite;
}

/* Недоступно (кулдаун) */
.cooldown-info.waiting {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--warning);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.cooldown-info.waiting i {
    color: var(--warning);
}

/* Заблокировано */
.cooldown-info.blocked {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--error);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.cooldown-info.blocked i {
    color: var(--error);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-success {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* ============================
   Profile
   ============================ */
.profile-card {
    background: var(--glass-bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-glow);
}

.profile-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.profile-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.profile-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
}

.profile-menu {
    display: grid;
    gap: 0.75rem;
}

.menu-item {
    background: var(--glass-bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.menu-item:hover {
    border-color: var(--glass-border-hover);
    transform: translateX(5px) translateY(-2px);
    box-shadow: var(--glass-shadow-hover);
    background: var(--glass-bg-hover);
}

.menu-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.menu-content span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.menu-content small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.menu-item > .fa-chevron-right {
    color: var(--text-muted);
}

/* ============================
   Bottom Navigation
   ============================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: 100%;
    background: var(--glass-bg-primary);
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    z-index: 100;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0.5rem;
}

.nav-item i {
    font-size: 1.3rem;
    transition: all var(--transition-base);
}

.nav-item:hover {
    color: var(--primary-blue);
}

.nav-item.active {
    color: var(--primary-blue);
}

.nav-item.active i {
    transform: scale(1.1);
}

/* ============================
   Modals
   ============================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--glass-bg-card);
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow-hover);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 35px;
    height: 35px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: var(--error);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.payment-methods {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.payment-method:hover {
    border-color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.1);
}

.payment-method.selected {
    border-color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.2);
}

.payment-method i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.amount-input {
    margin-bottom: 1.5rem;
}

.amount-input label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.amount-input input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
}

/* ============================
   Responsive Design
   ============================ */
@media (max-width: 480px) {
    .welcome-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-card {
        padding: 1rem;
    }
    
    .action-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* ============================
   Smooth Scrolling
   ============================ */
html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* ============================
   Utility Classes
   ============================ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-md); }
.mt-2 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-lg); }

.hidden {
    display: none !important;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Toast Notifications */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

/* Notification Item Styles */
.notification-item {
    position: relative;
    transition: all 0.3s ease;
}

.notification-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notification-item.unread {
    font-weight: 600;
}

