/* Telegram Web Viewer Font Normalization */
body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: 14px;
}

.ngat-app-container h1 { font-size: 1.5rem !important; }
.ngat-app-container h2 { font-size: 1.3rem !important; }
.ngat-app-container h3 { font-size: 1.1rem !important; }

/* ... existing styles ... */

/* Credit Display Styles */
.credit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.credit-count {
    font-weight: 800;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-earn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn-earn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* AI Help Button with Credit Cost */
.ai-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.credit-cost-tag {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

/* Profile Card and other existing styles... */
.profile-card { background: white; padding: 30px; border-radius: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); text-align: center; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.profile-header .avatar { font-size: 50px; background: #f1f5f9; width: 80px; height: 80px; line-height: 80px; border-radius: 50%; margin: 0 auto 15px; }
.badge { background: #dcfce7; color: #166534; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; text-transform: uppercase; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 20px; }
.stat-item { background: #f8fafc; padding: 15px; border-radius: 12px; border: 1px solid #e2e8f0; }
.stat-item strong { display: block; font-size: 18px; color: #1e40af; }
.stat-item span { font-size: 12px; color: #64748b; }
.divider { margin: 25px 0; border: 0; border-top: 1px solid #f1f5f9; }
.danger-zone { background: #fff1f2; padding: 20px; border-radius: 12px; border: 1px dashed #f43f5e; margin-top: 20px; }
.btn-delete { background: #f43f5e; color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.btn-delete:hover { background: #e11d48; }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); z-index: 10000; align-items: center; justify-content: center; transition: all 0.3s ease; }
.modal-content { background: #ffffff; width: 90%; max-width: 400px; padding: 30px; border-radius: 24px; text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.4); transform: translateY(20px); animation: slideUp 0.4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes slideUp { to { transform: translateY(0); opacity: 1; } }
.success-icon { font-size: 50px; margin-bottom: 10px; }
.modal-divider { border: 0; border-top: 1px solid #eee; margin: 20px 0; }
.promo-text { color: #475569; font-size: 0.95rem; line-height: 1.5; }
.modal-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 25px; }
.btn-upgrade { background: #2563eb; color: white; border: none; padding: 14px; border-radius: 14px; font-weight: bold; font-size: 1rem; cursor: pointer; transition: 0.3s; }
.btn-skip { background: transparent; color: #94a3b8; border: none; padding: 10px; font-size: 0.9rem; cursor: pointer; }
.btn-upgrade:hover { background: #1d4ed8; transform: scale(1.02); }
.btn-skip:hover { color: #64748b; text-decoration: underline; }
.close-x { position: absolute; top: 15px; right: 20px; font-size: 28px; color: #cbd5e1; cursor: pointer; }
.promo-container { margin: 20px 0; text-align: center; }
.promo-text { font-size: 1.2rem; font-weight: 800; letter-spacing: 0.5px; color: #1e293b; margin: 0; }
.glow-blink { animation: pulse-glow 1.5s infinite alternate ease-in-out; }
.price-tag { background: linear-gradient(90deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000); background-size: 400%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-size: 1.4rem; font-weight: 900; animation: rainbow-flow 3s linear infinite; display: inline-block; }
@keyframes pulse-glow { from { transform: scale(1); text-shadow: 0 0 5px rgba(255, 215, 0, 0.2); } to { transform: scale(1.05); text-shadow: 0 0 15px rgba(255, 165, 0, 0.8), 0 0 25px rgba(255, 69, 0, 0.5); } }
@keyframes rainbow-flow { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
:root { --primary: #1e40af; --accent: #3b82f6; --success: #10b981; --danger: #ef4444; --text: #1e293b; --bg: #f8fafc; }
.ngat-app-container { font-family: 'Inter', sans-serif; color: var(--text); background: var(--bg); padding: 2px; border-radius: 20px; }
.ngat-main-grid { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
@media (max-width: 900px) { .ngat-main-grid { grid-template-columns: 1fr; } }
#ngat-login { position: fixed; inset: 0; background: rgba(15,23,42,0.95); z-index: 99999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.login-box { background: white; padding: 40px; border-radius: 24px; text-align: center; width: 90%; max-width: 450px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 20px 0; text-align: left; }
.guide-item { background: #f8fafc; padding: 12px; border-radius: 10px; border-left: 4px solid var(--primary); font-size: 13px; }
/* Modern Exam Set Cards */
#category-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.set-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.set-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: #3b82f6;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.set-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 6px;
    background: #10b981;
    transition: 0.3s;
}

.set-card:hover::before {
    width: 10px;
}

.badge-free { background: #eff6ff; color: #1d4ed8; }
.badge-tag {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.set-info h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.set-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #64748b;
}

.badge-tag {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-premium {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-free {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.start-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: 0.3s;
}

.set-card:hover .start-btn-icon {
    background: #3b82f6;
    color: #ffffff;
    transform: rotate(90deg);
}
#quiz-modal { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.95); z-index: 100000; overflow-y: auto; padding: 20px; backdrop-filter: blur(4px); }
.quiz-content { background: #ffffff; width: 100%; max-width: 800px; margin: 20px auto; border-radius: 24px; padding: 40px; position: relative; color: #1e293b; }
.opt-btn { width: 100%; text-align: left; padding: 18px 25px; margin: 10px 0; border: 2px solid #e2e8f0; border-radius: 12px; background: #ffffff; color: #1e293b; font-size: 16px; cursor: pointer; transition: all 0.2s ease; }
.opt-btn:hover { border-color: #1e40af; background: #1e40af !important; color: #ffffff !important; }
.opt-btn.selected { background: #dbeafe !important; border-color: #1e40af !important; color: #1e40af !important; font-weight: 600; }
.nav-btn { padding: 12px 28px; border-radius: 10px; border: none; font-weight: 600; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; filter: grayscale(1); }
@media (max-width: 600px) { .quiz-content { padding: 20px; margin: 10px auto; } .opt-btn { padding: 15px; font-size: 14px; } }
.feedback-btn { display: inline-block; background-color: #1e40af; color: white !important; padding: 10px 20px; text-decoration: none !important; border-radius: 8px; font-weight: bold; font-size: 14px; transition: transform 0.2s; border: none; }
.blink-button { animation: feedbackGlow 2s infinite ease-in-out; }
@keyframes feedbackGlow { 0% { box-shadow: 0 0 0px rgba(30, 64, 175, 0.4); transform: scale(1); } 50% { box-shadow: 0 0 15px rgba(30, 64, 175, 0.8); transform: scale(1.05); background-color: #2563eb; } 100% { box-shadow: 0 0 0px rgba(30, 64, 175, 0.4); transform: scale(1); } }
.feedback-btn:hover { background-color: #1e3a8a; animation: none; }
#telegram-join-btn { background: linear-gradient(135deg, #0088cc, #005580); color: white; border: none; padding: 12px 25px; border-radius: 12px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3); transition: 0.3s; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; max-width: 300px; }
#telegram-join-btn:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 6px 20px rgba(0, 136, 204, 0.5); }
#telegram-join-btn:active { transform: translateY(0); }
