/* ===========================================
   CLEAN TELEGRAM MINI APP STYLES
   Modern, Minimalist Design
   =========================================== */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #e2e8f0;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT ===== */
.max-w-md {
    max-width: 28rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

/* ===== TYPOGRAPHY ===== */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-6xl { font-size: 3.75rem; }

.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ===== COLORS ===== */
.text-primary { color: #60a5fa; }
.text-secondary { color: #94a3b8; }
.text-success { color: #10b981; }
.text-gold { color: #fbbf24; }
.text-muted { color: #64748b; }

/* ===== FLEXBOX ===== */
.flex { display: flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ===== SPACING ===== */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.p-4 { padding: 1rem; }
.pb-24 { padding-bottom: 6rem; }

/* ===== SIZES ===== */
.w-10 { width: 2.5rem; }
.w-20 { width: 5rem; }
.w-full { width: 100%; }
.h-10 { height: 2.5rem; }
.h-20 { height: 5rem; }

/* ===== BORDERS & RADIUS ===== */
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.border-4 { border-width: 4px; }
.border-gold { border-color: #fbbf24; }



/* ===== CARDS ===== */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card-premium {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.03) 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
    position: relative;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== PROFILE COMPONENTS ===== */
.profile-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: 3px solid #fbbf24;
    object-fit: cover;
}

.profile-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.25rem;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.balance-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
    margin-top: 0.5rem;
}

/* ===== STATS COMPONENTS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 500;
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a1a2e;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    width: 100%;
    height: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

/* ===== FORM COMPONENTS ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: white;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: #fbbf24;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    display: flex;
    justify-content: space-around;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #94a3b8;
    transition: all 0.3s ease;
    min-width: 4rem;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.nav-icon {
    font-size: 1.25rem;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
    color: white;
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 20rem;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

/* ===== BACK BUTTON ===== */
.back-button {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 3rem;
    height: 3rem;
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fbbf24;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(251, 191, 36, 0.1);
}

/* ===== SUPPORT CHAT ===== */
.support-chat {
    position: fixed;
    bottom: 5rem;
    right: 1rem;
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}



/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .max-w-md {
        padding: 0 0.5rem;
    }

    .text-6xl {
        font-size: 3rem;
    }

    .card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .navbar {
        padding: 0.5rem;
    }

    .nav-item {
        min-width: 3rem;
    }
}
