/* EiFaStars - Telegram Mini App Styles */
/* Premium Design v2.0 */

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

:root {
    --primary: #8B5CF6;
    --primary-light: #A78BFA;
    --primary-dark: #7C3AED;
    --accent: #06B6D4;
    --accent-light: #22D3EE;
    --gradient-main: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #F59E0B 100%);
    --gradient-card: linear-gradient(180deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.05) 100%);
    --gradient-gold: linear-gradient(135deg, #F59E0B 0%, #FBBF24 50%, #FDE68A 100%);
    --gradient-bg: linear-gradient(180deg, #0A0A1B 0%, #1E1B4B 50%, #0F172A 100%);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --bg-dark: #0A0A1B;
    --bg-primary: #0F0F23;
    --bg-card: rgba(30, 27, 75, 0.6);
    --bg-card-hover: rgba(45, 40, 100, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --star-color: #FBBF24;
    --star-glow: rgba(251, 191, 36, 0.5);
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    --header-height: 64px;
    --nav-height: 72px;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --border-radius-lg: 24px;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 15px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--star-glow);
    --shadow-purple: 0 8px 30px rgba(139, 92, 246, 0.3);
}

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

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 0%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(1.5px 1.5px at 10% 10%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(1.5px 1.5px at 20% 25%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 30% 5%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(1.5px 1.5px at 40% 35%, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(2px 2px at 50% 15%, rgba(255, 255, 255, 0.95), transparent),
        radial-gradient(1.5px 1.5px at 60% 45%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(3px 3px at 70% 20%, rgba(251, 191, 36, 1), transparent),
        radial-gradient(1.5px 1.5px at 80% 55%, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(2px 2px at 90% 30%, rgba(255, 255, 255, 0.95), transparent),
        radial-gradient(1.5px 1.5px at 15% 60%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(3px 3px at 25% 75%, rgba(251, 191, 36, 0.95), transparent),
        radial-gradient(1.5px 1.5px at 35% 50%, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(2px 2px at 45% 85%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(1.5px 1.5px at 55% 65%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1.5px 1.5px at 65% 95%, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(3px 3px at 75% 70%, rgba(251, 191, 36, 1), transparent),
        radial-gradient(1.5px 1.5px at 85% 80%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 95% 60%, rgba(255, 255, 255, 0.95), transparent),
        var(--gradient-bg);
    background-size: 100% 100%;
    animation: bgPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgPulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 0.55; } }

.floating-stars { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.floating-star { position: absolute; font-size: 18px; opacity: 0; animation: shootingStar 4s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.8)); will-change: transform, opacity; }
.floating-star:nth-child(1) { top: 15%; right: -30px; animation-delay: 0s; animation-duration: 3.5s; }
.floating-star:nth-child(2) { top: 35%; right: -30px; animation-delay: 1.2s; animation-duration: 4s; font-size: 14px; }
.floating-star:nth-child(3) { top: 55%; right: -30px; animation-delay: 2.4s; animation-duration: 3.8s; font-size: 20px; }
.floating-star:nth-child(4) { top: 25%; right: -30px; animation-delay: 3.6s; animation-duration: 4.2s; font-size: 16px; }
.floating-star:nth-child(5) { top: 70%; right: -30px; animation-delay: 4.8s; animation-duration: 3.6s; font-size: 15px; }
.floating-star:nth-child(6) { top: 45%; right: -30px; animation-delay: 6s; animation-duration: 4.4s; font-size: 17px; }

@keyframes shootingStar {
    0% { transform: translate(0, 0) rotate(-45deg); opacity: 0; }
    10% { opacity: 0.8; }
    70% { opacity: 0.6; }
    100% { transform: translate(calc(-100vw - 60px), calc(60vh)) rotate(-45deg); opacity: 0; }
}

#app { width: 100%; min-height: 100vh; position: relative; z-index: 1; }
.screen { display: none; flex-direction: column; min-height: 100vh; padding-bottom: var(--nav-height); }
.screen.active { display: flex; }
#loading-screen { justify-content: center; align-items: center; background: transparent; }
.loader-container { text-align: center; }
.star-loader { width: 80px; height: 80px; margin: 0 auto 24px; }
.star-icon { width: 100%; height: 100%; fill: var(--star-color); filter: drop-shadow(0 0 20px var(--star-glow)); }
.star-icon.spinning { animation: spinGlow 1.5s ease-in-out infinite; }
@keyframes spinGlow { 0% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.1); } 100% { transform: rotate(360deg) scale(1); } }
.loading-text { color: var(--text-secondary); font-size: 16px; font-weight: 600; letter-spacing: 0.5px; }

.app-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: rgba(10, 10, 27, 0.8); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(139, 92, 246, 0.1); position: sticky; top: 0; z-index: 100; }
.user-info { display: flex; align-items: center; gap: 14px; cursor: pointer; transition: transform 0.2s; }
.user-info:active { transform: scale(0.98); }
.user-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--gradient-main); display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: var(--shadow-purple); border: 2px solid rgba(139, 92, 246, 0.3); }
.user-avatar svg { width: 24px; height: 24px; fill: white; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-details { display: flex; flex-direction: column; }
.user-name { font-weight: 700; font-size: 16px; letter-spacing: -0.3px; }
.user-balance { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--star-color); font-weight: 700; }
.user-balance svg { width: 16px; height: 16px; fill: var(--star-color); }
.send-stars-btn { width: 48px; height: 48px; border-radius: 14px; background: var(--gradient-gold); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4); }
.send-stars-btn:active { transform: scale(0.95); }
.send-stars-btn svg { width: 24px; height: 24px; fill: #1E1E2E; }

.promo-banner { margin: 20px 20px 16px; padding: 24px; background: var(--gradient-main); border-radius: var(--border-radius-lg); box-shadow: var(--shadow-purple); position: relative; overflow: hidden; }
.promo-banner::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%); animation: shimmer 3s infinite; }
@keyframes shimmer { 0% { transform: translateX(-100%) rotate(45deg); } 100% { transform: translateX(100%) rotate(45deg); } }
.banner-content { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.banner-icon { font-size: 48px; filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3)); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.banner-text h3 { font-size: 22px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.5px; }
.banner-text p { font-size: 14px; opacity: 0.9; }

.section-title { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.title-icon { width: 26px; height: 26px; fill: var(--star-color); filter: drop-shadow(0 0 8px var(--star-glow)); }

.packages-grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 14px !important; padding: 0 20px 24px !important; width: 100% !important; }
.package-card { background: var(--bg-card); backdrop-filter: blur(10px); border-radius: var(--border-radius); padding: 18px; cursor: pointer; text-align: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid rgba(139, 92, 246, 0.15); position: relative; overflow: hidden; }
.package-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gradient-main); opacity: 0; transition: opacity 0.3s; }
.package-card:active { transform: scale(0.97); }
.package-card:hover { background: var(--bg-card-hover); border-color: rgba(139, 92, 246, 0.3); box-shadow: var(--shadow-purple); }
.package-card:hover::before { opacity: 1; }
.package-card.popular { border-color: rgba(251, 191, 36, 0.4); background: linear-gradient(180deg, rgba(251, 191, 36, 0.1) 0%, var(--bg-card) 100%); }
.package-card.popular::before { background: var(--gradient-gold); opacity: 1; }
.popular-badge { position: absolute; top: -1px; right: 12px; background: var(--gradient-gold); color: #1E1E2E; padding: 4px 10px; border-radius: 0 0 8px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.package-stars { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.package-stars svg { width: 24px; height: 24px; fill: var(--star-color); filter: drop-shadow(0 0 6px var(--star-glow)); }
.package-stars span { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.package-price { font-size: 18px; font-weight: 700; color: var(--text-secondary); text-align: center; }
.package-per-star, .price-per-star { display: none !important; }
.package-btn { display: none !important; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-height); background: rgba(10, 10, 27, 0.95); backdrop-filter: blur(20px); display: flex; justify-content: space-around; align-items: center; padding: 8px 20px 20px; border-top: 1px solid rgba(139, 92, 246, 0.1); z-index: 100; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 8px 20px; border-radius: 12px; transition: all 0.3s; }
.nav-item svg { width: 24px; height: 24px; fill: currentColor; transition: all 0.3s; }
.nav-item span { font-size: 11px; font-weight: 600; letter-spacing: 0.3px; }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5)); }
.nav-item:active { transform: scale(0.95); }

.screen-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: rgba(10, 10, 27, 0.8); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(139, 92, 246, 0.1); position: sticky; top: 0; z-index: 100; }
.back-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--bg-glass); border: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.back-btn:active { transform: scale(0.95); background: rgba(255, 255, 255, 0.1); }
.back-btn svg { width: 24px; height: 24px; fill: var(--text-primary); }
.screen-title { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.header-spacer { width: 40px; }

.purchase-content { flex: 1; padding: 20px; overflow-y: auto; }
.selected-package { background: var(--bg-card); backdrop-filter: blur(10px); border-radius: var(--border-radius-lg); padding: 24px; text-align: center; margin-bottom: 24px; border: 1px solid rgba(139, 92, 246, 0.2); }
.selected-package .package-stars { justify-content: center; margin-bottom: 12px; }
.selected-package .package-stars svg { width: 36px; height: 36px; }
.selected-package .package-stars span { font-size: 32px; }
.package-prices { display: flex; flex-direction: column; gap: 4px; }
.price-rub { font-size: 28px; font-weight: 800; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.destination-section, .payment-methods { margin-bottom: 24px; }
.destination-section h3, .payment-methods h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--text-secondary); }
.destination-options { display: flex; flex-direction: column; gap: 12px; }
.destination-btn, .payment-btn { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--border-radius); cursor: pointer; transition: all 0.3s; width: 100%; text-align: left; }
.destination-btn:active, .payment-btn:active { transform: scale(0.98); }
.destination-btn.selected, .payment-btn.selected { border-color: var(--primary); background: rgba(139, 92, 246, 0.15); }
.destination-icon, .payment-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--bg-glass); }
.destination-icon.self { background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%); }
.destination-icon.username { background: linear-gradient(135deg, #06B6D4 0%, #22D3EE 100%); }
.destination-icon.balance { background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%); }
.sbp-icon { background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%); font-size: 12px; font-weight: 800; color: white; }
.destination-info, .payment-info { flex: 1; }
.destination-title, .payment-name { display: block; font-weight: 600; font-size: 15px; margin-bottom: 2px; color: var(--text-primary); }
.destination-desc { font-size: 13px; color: var(--text-muted); }
.payment-price { font-size: 14px; font-weight: 700; color: var(--star-color); }

.username-input-section { margin-bottom: 24px; display: none; }
.username-input-section.visible { display: block; }
.username-input-section label, .form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; }
.input-wrapper { display: flex; align-items: center; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--border-radius); padding: 0 16px; transition: all 0.3s; }
.input-wrapper:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2); }
.input-prefix { color: var(--text-muted); font-weight: 600; font-size: 16px; }
.input-wrapper input { flex: 1; background: none; border: none; padding: 16px 12px; font-size: 16px; color: var(--text-primary); outline: none; font-family: inherit; }
.input-wrapper input::placeholder { color: var(--text-muted); }
.input-status { width: 20px; height: 20px; }
.input-status.valid::after { content: '✓'; color: var(--success); font-weight: bold; }
.input-status.invalid::after { content: '✗'; color: var(--error); font-weight: bold; }
.input-status.loading::after { content: ''; display: block; width: 16px; height: 16px; border: 2px solid var(--text-muted); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.buy-btn, .primary-btn { width: 100%; padding: 18px; font-size: 17px; font-weight: 700; color: white; background: var(--gradient-main); border: none; border-radius: var(--border-radius); cursor: pointer; transition: all 0.3s; box-shadow: var(--shadow-purple); letter-spacing: -0.3px; }
.buy-btn:disabled, .primary-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.buy-btn:not(:disabled):active, .primary-btn:not(:disabled):active { transform: scale(0.98); }
.gold-btn { background: var(--gradient-gold); color: #1E1E2E; box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4); }

.deals-list { flex: 1; padding: 20px; overflow-y: auto; }
.deals-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.deals-empty svg { width: 80px; height: 80px; fill: var(--text-muted); margin-bottom: 20px; opacity: 0.5; }
.deals-empty h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.deals-empty p { color: var(--text-muted); font-size: 14px; }
.deal-item { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-card); border-radius: var(--border-radius); margin-bottom: 12px; cursor: pointer; transition: all 0.3s; border: 1px solid rgba(255, 255, 255, 0.05); }
.deal-item:active { transform: scale(0.98); }
.deal-item:hover { background: var(--bg-card-hover); border-color: rgba(139, 92, 246, 0.2); }
.deal-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.deal-icon.pending { background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%); }
.deal-icon.completed { background: linear-gradient(135deg, #10B981 0%, #34D399 100%); }
.deal-icon.failed { background: linear-gradient(135deg, #EF4444 0%, #F87171 100%); }
.deal-info { flex: 1; }
.deal-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.deal-date { font-size: 13px; color: var(--text-muted); }
.deal-amount { text-align: right; }
.deal-stars { font-weight: 700; font-size: 16px; color: var(--star-color); display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.deal-stars svg { width: 16px; height: 16px; fill: var(--star-color); }
.deal-price { font-size: 13px; color: var(--text-muted); }
.deal-status { font-size: 12px; padding: 4px 10px; border-radius: 6px; font-weight: 600; }
.deal-status.pending { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }
.deal-status.completed { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.deal-status.failed { background: rgba(239, 68, 68, 0.2); color: #F87171; }

.profile-content { flex: 1; padding: 20px; overflow-y: auto; }
.profile-card { text-align: center; padding: 30px 20px; background: var(--gradient-card); border-radius: var(--border-radius-lg); margin-bottom: 20px; border: 1px solid rgba(139, 92, 246, 0.15); }
.profile-avatar { width: 128px; height: 128px; border-radius: 50%; background: var(--gradient-main); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; box-shadow: var(--shadow-purple); overflow: hidden; }
.profile-avatar svg { width: 64px; height: 64px; fill: white; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.5px; }
.profile-username { color: var(--text-muted); font-size: 14px; }
.balance-card { display: flex; align-items: center; justify-content: space-between; padding: 20px; background: var(--bg-card); border-radius: var(--border-radius); margin-bottom: 20px; border: 1px solid rgba(251, 191, 36, 0.2); }
.balance-info { display: flex; flex-direction: column; gap: 4px; }
.balance-label { font-size: 13px; color: var(--text-muted); }
.balance-value { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 800; color: var(--star-color); }
.balance-value svg { width: 24px; height: 24px; fill: var(--star-color); }
.send-from-balance-btn { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: var(--gradient-gold); border: none; border-radius: 12px; color: #1E1E2E; font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.3s; }
.send-from-balance-btn:active { transform: scale(0.95); }
.send-from-balance-btn svg { width: 18px; height: 18px; fill: #1E1E2E; }
.profile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-item { background: var(--bg-card); border-radius: var(--border-radius); padding: 20px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.05); }
.stat-value { font-size: 24px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 4px; }
.stat-value svg { width: 20px; height: 20px; fill: var(--star-color); }
.stat-label { font-size: 13px; color: var(--text-muted); }
.profile-menu { display: flex; flex-direction: column; gap: 8px; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--border-radius); cursor: pointer; transition: all 0.3s; width: 100%; text-align: left; color: var(--text-primary); font-size: 15px; font-weight: 600; }
.menu-item:active { transform: scale(0.98); }
.menu-item:hover { background: var(--bg-card-hover); border-color: rgba(139, 92, 246, 0.2); }
.menu-item svg { width: 22px; height: 22px; fill: var(--text-secondary); }
.menu-item span { flex: 1; }
.menu-item .arrow { width: 20px; height: 20px; fill: var(--text-muted); }

.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); display: none; align-items: flex-end; justify-content: center; z-index: 1000; padding: 20px; }
.modal.active { display: flex; }
.modal-content { background: var(--bg-primary); border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0; width: 100%; max-width: 480px; max-height: 90vh; overflow: hidden; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.modal-header h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.close-btn { width: 36px; height: 36px; border-radius: 10px; background: var(--bg-glass); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.close-btn:active { transform: scale(0.95); }
.close-btn svg { width: 20px; height: 20px; fill: var(--text-secondary); }
.modal-body { padding: 20px; overflow-y: auto; max-height: calc(90vh - 80px); }
.form-group { margin-bottom: 20px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 16px; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--border-radius); font-size: 16px; color: var(--text-primary); font-family: inherit; transition: all 0.3s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.form-group textarea { resize: none; min-height: 120px; }

.quick-amounts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.quick-amount-btn { flex: 1; min-width: calc(33.33% - 8px); padding: 12px; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; color: var(--text-primary); font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.3s; }
.quick-amount-btn:active { transform: scale(0.95); }
.quick-amount-btn.selected { border-color: var(--primary); background: rgba(139, 92, 246, 0.2); }

.send-stars-info { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: var(--bg-card); border-radius: var(--border-radius); margin-bottom: 20px; }
.send-stars-info .label { font-size: 14px; color: var(--text-muted); }
.send-stars-info .value { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 700; color: var(--star-color); }
.send-stars-info .value svg { width: 20px; height: 20px; fill: var(--star-color); }

.support-content { flex: 1; padding: 20px; overflow-y: auto; }
.new-ticket-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--gradient-main); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.new-ticket-btn:active { transform: scale(0.95); }
.new-ticket-btn svg { width: 24px; height: 24px; fill: white; }
.tickets-list { display: flex; flex-direction: column; gap: 12px; }
.ticket-item { padding: 16px; background: var(--bg-card); border-radius: var(--border-radius); cursor: pointer; transition: all 0.3s; border: 1px solid rgba(255, 255, 255, 0.05); }
.ticket-item:active { transform: scale(0.98); }
.ticket-item:hover { background: var(--bg-card-hover); border-color: rgba(139, 92, 246, 0.2); }
.ticket-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.ticket-subject { font-weight: 600; font-size: 15px; flex: 1; margin-right: 12px; }
.ticket-status { font-size: 11px; padding: 4px 10px; border-radius: 6px; font-weight: 600; text-transform: uppercase; }
.ticket-status.open { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
.ticket-status.resolved { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.ticket-date { font-size: 13px; color: var(--text-muted); }

/* ===== КАРТОЧКИ ТИКЕТОВ ПОДДЕРЖКИ ===== */
.support-ticket-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(139, 92, 246, 0.15);
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.support-ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-main);
    opacity: 0;
    transition: opacity 0.3s;
}

.support-ticket-card:hover::before,
.support-ticket-card:active::before {
    opacity: 1;
}

.support-ticket-card:active {
    transform: scale(0.98);
}

.support-ticket-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.support-ticket-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 0;
}

.support-ticket-subject {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
    flex: 1;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.support-ticket-status {
    font-size: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.support-ticket-status.open {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(96, 165, 250, 0.15));
    color: #60A5FA;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.support-ticket-status.waiting_user {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(251, 191, 36, 0.15));
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.support-ticket-status.resolved {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(52, 211, 153, 0.15));
    color: #34D399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.support-ticket-status.in_progress {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(167, 139, 250, 0.15));
    color: #A78BFA;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.support-ticket-status.closed {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.25), rgba(156, 163, 175, 0.15));
    color: #9CA3AF;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.support-ticket-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.support-ticket-meta::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.5;
}

.support-ticket-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 14px;
}

.support-ticket-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--primary);
    opacity: 0.9;
}

.support-ticket-content {
    flex: 1;
    min-width: 0;
}

.support-ticket-content .support-ticket-meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.support-ticket-content .support-ticket-meta::before {
    display: none;
}

.meta-icon {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
    opacity: 0.7;
}

.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.chat-message { max-width: 85%; padding: 14px 18px; border-radius: 18px; font-size: 15px; line-height: 1.4; }
.chat-message.user { background: var(--gradient-main); align-self: flex-end; border-bottom-right-radius: 6px; }
.chat-message.admin { background: var(--bg-card); align-self: flex-start; border-bottom-left-radius: 6px; }
.message-time { font-size: 11px; color: rgba(255, 255, 255, 0.5); margin-top: 6px; text-align: right; }
/* chat-input styles moved to bottom of file */
.send-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--gradient-main); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.send-btn:active { transform: scale(0.95); }
.send-btn svg { width: 22px; height: 22px; fill: white; }

.deal-content { flex: 1; padding: 20px; overflow-y: auto; }
.deal-header-card { background: var(--gradient-card); border-radius: var(--border-radius-lg); padding: 24px; text-align: center; margin-bottom: 24px; border: 1px solid rgba(139, 92, 246, 0.15); }
.deal-header-card .deal-stars { font-size: 36px; justify-content: center; margin-bottom: 8px; }
.deal-header-card .deal-stars svg { width: 36px; height: 36px; }
.deal-header-card .deal-price { font-size: 20px; color: var(--text-secondary); }
.deal-details { display: flex; flex-direction: column; gap: 16px; }

/* ===== УЛУЧШЕННЫЙ ДИЗАЙН СДЕЛКИ ===== */
.deal-detail-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    position: relative;
    overflow: hidden;
}

.deal-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-main);
    opacity: 0.6;
}

.deal-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.deal-detail-stars {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 32px;
    font-weight: 800;
    color: var(--star-color);
}

.deal-detail-stars svg {
    width: 36px;
    height: 36px;
    fill: var(--star-color);
    filter: drop-shadow(0 0 10px var(--star-glow));
}

.deal-status {
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deal-status.pending,
.deal-status.payment_pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(251, 191, 36, 0.15));
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.deal-status.processing,
.deal-status.payment_received {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(167, 139, 250, 0.15));
    color: #A78BFA;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.deal-status.completed,
.deal-status.stars_sent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(52, 211, 153, 0.15));
    color: #34D399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.deal-detail-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.detail-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
}

.detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.detail-value {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.deal-progress {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-icon {
    width: 24px;
    height: 24px;
    fill: var(--primary);
    opacity: 0.8;
}

.progress-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin: 0;
}

.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.progress-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    position: relative;
}

.progress-step:last-child {
    padding-bottom: 0;
}

.progress-step:last-child .step-line {
    display: none;
}

.step-line {
    position: absolute;
    left: 21px;
    top: 48px;
    width: 2px;
    height: calc(100% - 16px);
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.progress-step.completed .step-line {
    background: linear-gradient(180deg, var(--primary) 0%, rgba(139, 92, 246, 0.3) 100%);
}

.step-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.progress-step.completed .step-dot {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.progress-step.active .step-dot {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.2));
    border-color: var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

.progress-step.pending .step-dot {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.step-dot svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.step-icon {
    font-size: 18px;
    opacity: 0.6;
}

.progress-step.completed .step-icon,
.progress-step.active .step-icon {
    opacity: 1;
}

.step-info {
    flex: 1;
    padding-top: 4px;
}

.step-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.progress-step.pending .step-title {
    color: var(--text-muted);
}

.step-time {
    font-size: 13px;
    color: var(--text-muted);
}

.progress-step.completed .step-time,
.progress-step.active .step-time {
    color: var(--text-secondary);
}

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

.deal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: -0.2px;
}

.action-btn.primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: var(--shadow-purple);
}

.action-btn.primary:active {
    transform: scale(0.98);
}

.action-btn.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.1));
    color: #F87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.action-btn.danger:active {
    transform: scale(0.98);
}

.action-btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn.secondary:active {
    transform: scale(0.98);
}

.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: var(--bg-card); border-radius: var(--border-radius); }
.detail-label { color: var(--text-muted); font-size: 14px; }
.detail-value { font-weight: 600; font-size: 15px; }

#toast-container { position: fixed; top: 20px; left: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { padding: 16px 20px; background: var(--bg-primary); border-radius: var(--border-radius); box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, 0.1); pointer-events: auto; animation: toastIn 0.3s ease-out; display: flex; align-items: center; gap: 12px; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }
@keyframes toastIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast.hide { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastOut { to { transform: translateY(-20px); opacity: 0; } }

@media (max-width: 380px) {
    .packages-grid { gap: 10px !important; padding: 0 16px 20px !important; }
    .package-card { padding: 14px; }
    .package-stars span { font-size: 18px; }
    .package-price { font-size: 16px; }
    .promo-banner { margin: 16px; padding: 20px; }
    .banner-icon { font-size: 40px; }
    .banner-text h3 { font-size: 18px; }
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.5); }
::selection { background: rgba(139, 92, 246, 0.4); color: white; }

/* ===== УЛУЧШЕННЫЕ СТИЛИ СДЕЛОК v2 ===== */
.deals-list {
    padding: 16px;
}

.deal-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(139, 92, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.deal-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    border-radius: 4px 0 0 4px;
}

.deal-item.pending::before { background: linear-gradient(180deg, #F59E0B, #FBBF24); }
.deal-item.completed::before { background: linear-gradient(180deg, #10B981, #34D399); }
.deal-item.failed::before { background: linear-gradient(180deg, #EF4444, #F87171); }

.deal-item:hover {
    transform: translateX(4px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.15);
}

.deal-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.deal-info {
    flex: 1;
    min-width: 0;
}

.deal-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deal-recipient {
    color: var(--primary-light);
    font-size: 14px;
}

.deal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.deal-date {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.deal-amount {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.deal-stars {
    font-weight: 800;
    font-size: 20px;
    color: var(--star-color);
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.deal-stars svg {
    width: 20px; height: 20px;
    fill: var(--star-color);
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
}

.deal-status {
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== УЛУЧШЕННАЯ СТРАНИЦА СДЕЛКИ ===== */
.deal-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.deal-hero {
    background: var(--gradient-card);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.deal-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-main);
}

.deal-hero-icon {
    width: 80px; height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.5));
}

.deal-hero-stars {
    font-size: 48px;
    font-weight: 900;
    color: var(--star-color);
    letter-spacing: -2px;
    margin-bottom: 8px;
    text-shadow: 0 0 40px rgba(251, 191, 36, 0.4);
}

.deal-hero-status {
    display: inline-flex;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deal-hero-status.pending { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }
.deal-hero-status.completed { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.deal-hero-status.failed { background: rgba(239, 68, 68, 0.2); color: #F87171; }

.deal-info-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.deal-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.deal-info-row:last-child { border-bottom: none; }

.deal-info-label {
    font-size: 14px;
    color: var(--text-muted);
}

.deal-info-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.deal-info-value.highlight {
    color: var(--star-color);
}

.deal-progress {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.deal-progress h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-timeline {
    position: relative;
    padding-left: 32px;
}

.progress-step {
    position: relative;
    padding-bottom: 24px;
}

.progress-step:last-child { padding-bottom: 0; }

.progress-step::before {
    content: '';
    position: absolute;
    left: -24px; top: 8px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 2px solid var(--text-muted);
}

.progress-step.completed::before {
    background: var(--success);
    border-color: var(--success);
}

.progress-step.current::before {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.3);
}

.progress-step::after {
    content: '';
    position: absolute;
    left: -17px; top: 24px;
    width: 2px; height: calc(100% - 16px);
    background: rgba(255, 255, 255, 0.1);
}

.progress-step:last-child::after { display: none; }

.progress-step.completed::after { background: var(--success); }

.progress-step-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.progress-step-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== УЛУЧШЕННАЯ ПОДДЕРЖКА ===== */
.support-content {
    padding: 16px;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(139, 92, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.ticket-item::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 4px; height: 100%;
}

.ticket-item.open::before { background: linear-gradient(180deg, #3B82F6, #60A5FA); }
.ticket-item.waiting_user::before { background: linear-gradient(180deg, #F59E0B, #FBBF24); }
.ticket-item.resolved::before { background: linear-gradient(180deg, #10B981, #34D399); }

.ticket-item:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.15);
}

.ticket-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ticket-subject {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
    flex: 1;
}

.ticket-status {
    font-size: 10px;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ticket-status.open { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
.ticket-status.waiting_user { background: rgba(245, 158, 11, 0.2); color: #FBBF24; }
.ticket-status.resolved { background: rgba(16, 185, 129, 0.2); color: #34D399; }

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.support-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.support-empty-icon {
    width: 80px; height: 80px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.support-empty h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.support-empty p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== УЛУЧШЕННЫЙ ЧАТ ===== */
#chat-screen.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Hide bottom nav when chat is active */
#chat-screen.active ~ .bottom-nav,
.app-container:has(#chat-screen.active) .bottom-nav {
    display: none !important;
}

#chat-screen .screen-header {
    flex-shrink: 0;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    padding-bottom: 100px; /* Space for fixed input */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.03) 100%);
}

.chat-message {
    max-width: 80%;
    position: relative;
    animation: messageIn 0.3s ease-out;
}

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

.chat-message.user {
    align-self: flex-end;
}

.chat-message.admin {
    align-self: flex-start;
}

.message-bubble {
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.5;
}

.chat-message.user .message-bubble {
    background: var(--gradient-main);
    border-bottom-right-radius: 6px;
}

.chat-message.admin .message-bubble {
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-bottom-left-radius: 6px;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    padding: 0 4px;
}

.chat-message.user .message-time { text-align: right; }
.chat-message.admin .message-time { text-align: left; }

.chat-date-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
}

.chat-date-divider span {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input-container {
    display: none; /* Hidden by default */
    gap: 12px;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 10, 27, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* Show only when chat screen is active */
#chat-screen.active .chat-input-container {
    display: flex;
}

.chat-input-container input {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 25px;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    transition: all 0.3s;
}

.chat-input-container input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.send-btn {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.send-btn:active { transform: scale(0.95); }

.send-btn svg {
    width: 22px; height: 22px;
    fill: white;
}

/* ===== КАСТОМНОЕ КОЛ-ВО ЗВЁЗД ===== */
.custom-amount-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin-top: 16px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.custom-amount-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-amount-range {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted, rgba(255,255,255,0.5));
    margin-left: auto;
}

.custom-amount-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.custom-amount-input {
    flex: 1;
    padding: 14px 16px;
    background: var(--bg-glass);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--star-color);
    text-align: center;
    outline: none;
    font-family: inherit;
    transition: all 0.3s;
}

.custom-amount-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.custom-amount-input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.custom-amount-btn {
    padding: 14px 24px;
    background: var(--gradient-main);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.custom-amount-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-purple);
}

.custom-amount-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.custom-amount-info {
    margin-top: 12px;
    padding: 12px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-amount-price {
    font-weight: 700;
    color: var(--star-color);
}

/* Reviews Section */
.package-reviews-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviews-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 700;
}

.reviews-rating .star-filled {
    width: 20px;
    height: 20px;
    fill: var(--star-color);
}

.reviews-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.all-reviews-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.all-reviews-btn:hover {
    background: rgba(139, 92, 246, 0.1);
}

.reviews-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Review Card */
.review-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.review-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.review-name {
    font-size: 14px;
    font-weight: 600;
}

.review-date {
    font-size: 12px;
    color: var(--text-muted);
}

.review-rating {
    font-size: 14px;
    letter-spacing: 2px;
}

.review-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.review-package {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(139, 92, 246, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

/* Reviews Modal */
.reviews-modal-content {
    max-height: 85vh;
}

.reviews-modal-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.reviews-big-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.big-rating-value {
    font-size: 48px;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.big-rating-stars {
    font-size: 24px;
    letter-spacing: 4px;
}

.big-rating-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.reviews-modal-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reviews-loading,
.reviews-empty,
.reviews-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.reviews-load-more {
    text-align: center;
    padding-top: 16px;
}

.load-more-btn {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: rgba(139, 92, 246, 0.2);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Write Review Modal */
.review-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rating-select label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.stars-select {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.star-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    font-size: 32px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    filter: grayscale(1);
    opacity: 0.5;
}

.star-btn:hover {
    transform: scale(1.1);
}

.star-btn.selected {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1);
}

.review-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.review-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.review-form textarea::placeholder {
    color: var(--text-muted);
}

.review-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}
.highlight-number {
    color: #FFD700;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
