/* ========================================
   Global Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.quiz-header {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-link {
    color: #667eea;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #f0f0f0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.user-details h3 {
    font-size: 16px;
    color: #333;
}

.user-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.coin-icon {
    color: #f39c12;
    font-weight: bold;
}

.score-icon {
    color: #3498db;
    font-weight: bold;
}

.back-btn {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.back-btn:hover {
    background: #d0d0d0;
}

/* ========================================
   Profile Page Styles
   ======================================== */
.profile-header {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: bold;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 32px;
    color: #333;
    margin-bottom: 5px;
}

.profile-username {
    color: #666;
    font-size: 18px;
    margin-bottom: 5px;
}

.profile-phone {
    color: #667eea;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 500;
}

.profile-badges {
    display: flex;
    gap: 20px;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
}

.badge.coins {
    color: #f39c12;
}

.badge.score {
    color: #3498db;
}

/* ========================================
   Stats Grid
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   Content Grid & Cards
   ======================================== */
.section-title {
    color: white;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

.recent-quizzes {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.recent-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

/* ========================================
   Category Styles
   ======================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.category-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.category-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-info .category-icon {
    font-size: 36px;
}

.category-details h2 {
    color: #333;
    margin-bottom: 5px;
}

.progress-text {
    color: #666;
    font-size: 14px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-details h4 {
    color: #333;
    font-size: 16px;
    margin-bottom: 3px;
}

.category-details p {
    color: #666;
    font-size: 13px;
}

.category-score {
    text-align: right;
}

.category-score .score {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.category-score .accuracy {
    font-size: 13px;
    color: #666;
}

/* ========================================
   Button Styles
   ======================================== */
.start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    width: 100%;
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

.subscribe-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.unsubscribe-section {
    margin-top: 40px;
    text-align: center;
}

.unsubscribe-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.unsubscribe-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* ========================================
   Activity Styles
   ======================================== */
.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-icon {
    font-size: 24px;
}

.activity-details h4 {
    color: #333;
    font-size: 15px;
    margin-bottom: 3px;
}

.activity-details p {
    color: #666;
    font-size: 12px;
}

.activity-score {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

/* ========================================
   Quiz Styles
   ======================================== */
.progress-bar-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.timer {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.question-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.question-number {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 16px;
}

.question-text {
    font-size: 24px;
    color: #333;
    margin-bottom: 40px;
    line-height: 1.5;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.option-btn {
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.option-letter {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    color: #333;
}

.start-card {
    background: white;
    border-radius: 15px;
    padding: 60px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.start-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.start-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
}

.start-description {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.quiz-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.info-item {
    text-align: center;
}

.info-value {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

.info-label {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* ========================================
   Quiz Items & Results
   ======================================== */
.quiz-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.quiz-item:last-child {
    border-bottom: none;
}

.quiz-info h4 {
    color: #333;
    margin-bottom: 5px;
}

.quiz-info p {
    color: #666;
    font-size: 14px;
}

.quiz-score {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
}

/* ========================================
   Results Page Styles
   ======================================== */
.results-card {
    background: white;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
}

.result-icon {
    font-size: 100px;
    margin-bottom: 20px;
    animation: bounce 1s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.result-title {
    font-size: 42px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.result-subtitle {
    color: #666;
    font-size: 18px;
    margin-bottom: 40px;
}

.stat-box {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.rewards {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.reward-item {
    display: flex;
    align-items: center;
}

/* ========================================
   Leaderboard Styles
   ======================================== */
.page-title {
    color: white;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.page-subtitle {
    color: rgba(255,255,255,0.8);
    text-align: center;
    margin-bottom: 30px;
}

.user-rank-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rank-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rank-badge {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.rank-details h3 {
    color: #333;
    margin-bottom: 5px;
}

.rank-details p {
    color: #666;
    font-size: 14px;
}

.leaderboard-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 1fr 120px 120px;
    gap: 15px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 120px;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
    transition: all 0.3s ease;
}

.leaderboard-row:hover {
    background: #f8f9fa;
    border-radius: 10px;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-row.current-user {
    background: #f0f4ff;
    border-radius: 10px;
    border: 2px solid #667eea;
}

.medal {
    font-size: 28px;
}

.rank-position {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.rank-position.top-1 {
    color: #f39c12;
}

.rank-position.top-2 {
    color: #95a5a6;
}

.rank-position.top-3 {
    color: #cd7f32;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.user-details h4 {
    color: #333;
    font-size: 16px;
    margin-bottom: 3px;
    margin: 0;
}

.user-details p {
    color: #666;
    font-size: 13px;
    margin: 0;
}

.score-value {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.coins-value {
    font-size: 16px;
    font-weight: bold;
    color: #f39c12;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========================================
   Form Styles
   ======================================== */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   Container Styles
   ======================================== */
.subscribe-container,
.register-container,
.login-container,
.verify-container,
.resend-container,
.setup-container,
.unsubscribe-container,
.success-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 50px;
    width: 100%;
}

.subscribe-container,
.register-container,
.login-container,
.verify-container,
.resend-container,
.setup-container {
    max-width: 500px;
    margin: 0 auto;
}

.unsubscribe-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.success-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Message Styles
   ======================================== */
.error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #c33;
}

.success {
    background: #efe;
    color: #2d5016;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #27ae60;
    text-align: center;
}

/* ========================================
   Info & Warning Boxes
   ======================================== */
.info-box {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 16px;
}

.info-box ul {
    margin-left: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

.warning-box {
    background: #fff3cd;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: left;
    border-left: 4px solid #ffc107;
}

.warning-box h3 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 18px;
}

.warning-box ul {
    margin-left: 20px;
    color: #856404;
    line-height: 1.8;
}

.info-text {
    background: #fff3cd;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    color: #856404;
    font-size: 14px;
    border-left: 4px solid #ffc107;
}

/* ========================================
   Links & Dividers
   ======================================== */
.links {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
}

.links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.links a:hover {
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #ddd;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* ========================================
   Misc Styles
   ======================================== */
.icon {
    text-align: center;
    font-size: 80px;
    margin-bottom: 20px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 16px;
    line-height: 1.6;
}

.phone-display {
    background: #f0f4ff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    color: #667eea;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.helper-text {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-top: 10px;
}

.required {
    color: #e74c3c;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* ========================================
   Feedback Section
   ======================================== */
.feedback-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.feedback-section h4 {
    color: #666;
    margin-bottom: 15px;
    font-size: 16px;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* ========================================
   Benefits Section
   ======================================== */
.benefits {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: left;
}

.benefits h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.benefit-icon {
    font-size: 32px;
}

.benefit-text {
    flex: 1;
}

.benefit-text h4 {
    color: #333;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: rgba(0, 0, 0, 0.1);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    border-radius: 15px;
    font-size: 14px;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-badges {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .leaderboard-header,
    .leaderboard-row {
        grid-template-columns: 50px 1fr 80px;
        gap: 10px;
    }

    .coins-value {
        display: none;
    }

    .user-rank-card {
        flex-direction: column;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .quiz-header {
        flex-direction: column;
        gap: 20px;
    }

    .question-card {
        padding: 25px;
    }

    .start-card {
        padding: 40px 25px;
    }

    .quiz-info {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 500px) {
    .subscribe-container,
    .register-container,
    .login-container,
    .verify-container,
    .resend-container,
    .setup-container,
    .unsubscribe-container,
    .success-container {
        padding: 30px;
    }

    .button-group {
        flex-direction: column;
    }

    .profile-header {
        padding: 20px;
    }

    .start-card {
        padding: 25px;
    }
}

/* ========================================
   Additional Page-Specific Styles
   ======================================== */

/* Unsubscribe Page */
body.unsubscribe-page {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Subscribe Success Page */
body.subscribe-success-page {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Unsubscribe Success Page */
body.unsubscribe-success-page {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Results Page */
body.results-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading Screen */
.loading-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-screen.active {
    display: flex;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.loading-spinner::after {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    margin: 8px;
    border-radius: 50%;
    border: 6px solid #ffffff;
    border-color: #ffffff transparent #ffffff transparent;
    animation: loading-spin 1.2s linear infinite;
}

@keyframes loading-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 60px);
    color: white;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    width: 200px;
}

/* Verify OTP / Send OTP Page */
body.verify-otp-page,
body.send-otp-page,
body.setup-username-page {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* ========================================
   Footer Styles
   ======================================== */
footer {
    background: rgba(0, 0, 0, 0.1);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    border-radius: 15px;
    font-size: 14px;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* ========================================
   OTP Verification Page Styles
   ======================================== */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ef5350;
    text-align: center;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #66bb6a;
    text-align: center;
}

.info-text {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.masked-number {
    font-weight: 600;
    color: #667eea;
}

form input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
    text-align: center;
    letter-spacing: 3px;
    font-weight: 600;
}

form input[type="text"]:focus {
    border-color: #667eea;
}

#countdown {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #e74c3c;
    font-weight: 600;
}

#countdown.warning {
    color: #f39c12;
}

.attempts-info {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #999;
}

.expired-container {
    text-align: center;
    padding: 20px;
}

.expired-container h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.expired-container p {
    color: #666;
    margin-bottom: 20px;
}

.resend-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    margin-top: 10px;
}

.resend-btn:hover:not(:disabled) {
    background: #5568d3;
}

.resend-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}




        .results-card {
            background: white;
            border-radius: 20px;
            padding: 50px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.2);
            text-align: center;
        }

        .result-icon {
            font-size: 100px;
            margin-bottom: 20px;
            animation: bounce 1s ease;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-20px); }
        }

        .result-title {
            font-size: 42px;
            font-weight: bold;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 15px;
        }

        .result-subtitle {
            color: #666;
            font-size: 18px;
            margin-bottom: 40px;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 3fr));
            gap: 20px;
            margin-bottom: 40px;
        }

        .stat-box {
            background: #f8f9fa;
            border-radius: 15px;
            padding: 25px;
        }

        .stat-value {
            font-size: 36px;
            font-weight: bold;
            color: #333;
            margin-bottom: 8px;
        }

        .stat-label {
            color: #666;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .rewards {
            background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 30px;
            display: flex;
            justify-content: space-around;
            align-items: center;
        }

        .reward-item {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 24px;
            font-weight: bold;
            color: #333;
        }

        .reward-icon {
            font-size: 32px;
        }

        .action-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn {
            padding: 15px 35px;
            border: none;
            border-radius: 30px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
        }

        .btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
        }

        .btn-secondary {
            background: #e0e0e0;
            color: #333;
        }

        .btn-secondary:hover {
            background: #d0d0d0;
        }

        .performance-bar {
            margin: 30px 0;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 15px;
        }

        .performance-label {
            text-align: left;
            margin-bottom: 10px;
            color: #666;
            font-weight: 500;
        }

        .bar-container {
            height: 30px;
            background: #e0e0e0;
            border-radius: 15px;
            overflow: hidden;
            position: relative;
        }

        .bar-fill {
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            transition: width 1s ease;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding-right: 15px;
        }

        .bar-text {
            color: white;
            font-weight: bold;
            font-size: 14px;
        }

        .category-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: #f0f4ff;
            padding: 8px 20px;
            border-radius: 20px;
            margin-bottom: 20px;
            font-weight: 500;
            color: #667eea;
        }

  