:root {
    --royal-maroon: #800000;
    --fort-sand: #f4e4bc;
    --desert-gold: #d4af37;
    --jaipur-pink: #d94f70;
    --jodhpur-blue: #004aad;
    --text-dark: #2d1b0e;
    --success-green: #2e7d32;
    --card-bg: #ffffff;
    --screen-bg: var(--fort-sand);
    --border-color: #e6d5b8;
}

body.night-mode {
    --royal-maroon: #ff8a80;
    --fort-sand: #121212;
    --desert-gold: #bcaaa4;
    --jaipur-pink: #f48fb1;
    --jodhpur-blue: #90caf9;
    --text-dark: #e0e0e0;
    --success-green: #81c784;
    --card-bg: #1e1e1e;
    --screen-bg: #121212;
    --border-color: #333333;
    background-image: none;
    background-color: #000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Custom Cursors for Desktop */
@media (min-width: 1024px) {
    body {
        cursor: url('https://cdn-icons-png.flaticon.com/32/867/867448.png'), auto;
    }
    
    button,
    .manzil-card,
    .menu-card {
        cursor: url('https://cdn-icons-png.flaticon.com/32/2554/2554039.png'), pointer;
    }
}

body {
    font-family: 'Hind', sans-serif;
    background-color: #800000;
    background-image:
        radial-gradient(#d4af37 2px, transparent 3px),
        radial-gradient(#d94f70 2px, transparent 3px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--text-dark);
    transition: background-color 0.3s;
}

.app-frame {
    width: 100%;
    max-width: 500px;
    height: 100%;
    height: 100dvh;
    background: var(--screen-bg);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: background 0.3s;
}

@media (min-width: 600px) {
    .app-frame {
        height: 90vh;
        border-radius: 40px;
        border: 6px solid var(--desert-gold);
        outline: 10px solid #4a0000;
    }
}

.royal-border-top {
    height: 12px;
    background: repeating-linear-gradient(45deg, var(--royal-maroon), var(--royal-maroon) 10px, var(--desert-gold) 10px, var(--desert-gold) 20px);
    border-bottom: 2px solid var(--desert-gold);
    z-index: 50;
    flex-shrink: 0;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin-top: 15px;
    display: none;
    flex-direction: column;
    background: var(--screen-bg);
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    z-index: 10;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

body.night-mode .screen {
    background-image: none;
}

.screen.active {
    display: flex;
    opacity: 1;
    z-index: 20;
    transform: scale(1);
}

/* =========================================
   NEW ROYAL HEADER STYLES
   ========================================= */
.home-header-modern {
    background: var(--royal-maroon);
    padding: 15px 20px;
    padding-top: max(15px, env(safe-area-inset-top));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid var(--desert-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 50;
    color: white;
    flex-shrink: 0;
}

.header-profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-circle-frame {
    width: 65px;
    height: 65px;
    background: #ffffff;
    /* White background for Avatar */
    border-radius: 50%;
    border: 3px solid var(--desert-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    animation: float 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.header-text-block {
    display: flex;
    flex-direction: column;
}

.header-title-main {
    font-family: 'Yatra One', serif;
    font-size: 1.6rem;
    color: #fff;
    line-height: 1.1;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.header-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: var(--desert-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-stats-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.stat-pill {
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: 'Poppins', sans-serif;
    backdrop-filter: blur(4px);
    cursor: pointer;
    transition: transform 0.2s;
}

.stat-pill:active {
    transform: scale(0.95);
}

/* =========================================
   NEW GRID MENU STYLES
   ========================================= */
.royal-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 15px;
    flex-shrink: 0;
}

@media (max-width: 360px) {
    .royal-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.menu-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 12px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-bottom: 3px solid transparent;
    min-height: 85px;
    position: relative;
    overflow: hidden;
}

.menu-card:active {
    transform: scale(0.95);
}

.mc-icon {
    font-size: 1.6rem;
    transition: transform 0.3s;
}

.menu-card:hover .mc-icon {
    transform: scale(1.2) rotate(5deg);
}

.mc-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Feature Icon Colors */
.mc-blue {
    color: #1976D2;
}

.mc-yellow {
    color: #FFA000;
}

.mc-red {
    color: #D32F2F;
}

.mc-purple {
    color: #7B1FA2;
}

.mc-indigo {
    color: #303F9F;
}

.mc-brown {
    color: #5D4037;
}

.mc-green {
    color: #388E3C;
}

.mc-maroon {
    color: #800000;
}

/* =========================================
   LIST & MANZIL CARDS
   ========================================= */
.manzil-list {
    padding: 0 15px 0 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-content: start;
}

.manzil-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-bottom: 4px solid var(--royal-maroon);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    text-align: left;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    min-height: 80px;
    grid-column: span 2;
}

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

.span-2 {
    grid-column: span 2;
}

.manzil-card.ranbhoomi-card {
    background: linear-gradient(135deg, #a00000 0%, #4a0000 100%);
    border: 2px solid #ffcc00;
    color: white;
    box-shadow: 0 5px 15px rgba(128, 0, 0, 0.3);
}

.manzil-card.potli-card {
    border-bottom: 4px solid var(--jaipur-pink);
    background: linear-gradient(to right, rgba(217, 79, 112, 0.05), transparent);
}

.fact-card {
    background: var(--card-bg);
    border: 2px dashed var(--desert-gold);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    color: var(--text-dark);
    position: relative;
    flex-direction: column;
}

.m-icon {
    width: 45px;
    height: 45px;
    background: var(--royal-maroon);
    color: var(--screen-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.m-info h3 {
    font-family: 'Rozha One', serif;
    color: inherit;
    font-size: 1.1rem;
}

.m-score {
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    margin-top: 4px;
}

.ranbhoomi-card .m-score {
    color: #ffd700;
}

/* =========================================
   QUIZ UI
   ========================================= */
.top-bar {
    padding: 12px 15px;
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    border-bottom: 2px solid var(--desert-gold);
    flex-shrink: 0;
    padding-top: max(12px, env(safe-area-inset-top));
    transition: background 0.3s;
    z-index: 5;
}

.btn-home-royal {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--royal-maroon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
}

.timer-royal {
    background: var(--royal-maroon);
    color: var(--screen-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    border: 2px solid var(--desert-gold);
    font-family: 'Yatra One';
    font-size: 1rem;
    white-space: nowrap;
    margin: 0 auto;
    min-width: 100px;
    font-variant-numeric: tabular-nums;
}

.btn-submit-royal {
    height: 40px;
    padding: 0 15px;
    border-radius: 10px;
    border: none;
    background: var(--success-green);
    color: white;
    font-family: 'Hind', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.quiz-area {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 30px;
    min-height: 0;
}

.scroll-container {
    background: var(--card-bg);
    width: 100%;
    padding: 25px 15px 20px 15px;
    border-radius: 15px;
    border: 1px solid var(--desert-gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    margin-bottom: 15px;
    transition: background 0.3s;
}

.action-btn-group {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 20;
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--desert-gold);
}

.bookmark-btn.active {
    color: var(--royal-maroon);
}

.q-tag {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--screen-bg);
    text-transform: uppercase;
    background: var(--desert-gold);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 10px;
}

.mcq-options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.mcq-option {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mcq-option:active {
    transform: scale(0.98);
}

.mcq-option:hover {
    border-color: var(--desert-gold);
}

.mcq-option .opt-badge {
    width: 32px;
    height: 32px;
    background: var(--desert-gold);
    color: var(--royal-maroon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Yatra One';
    font-size: 0.9rem;
    flex-shrink: 0;
}

.mcq-option.selected {
    background: rgba(0, 74, 173, 0.1);
    border-color: var(--jodhpur-blue);
}

.mcq-option.selected .opt-badge {
    background: var(--jodhpur-blue);
    color: white;
}

.mcq-option.correct {
    background: rgba(46, 125, 50, 0.1);
    border-color: var(--success-green);
}

.mcq-option.correct .opt-badge {
    background: var(--success-green);
    color: white;
}

.mcq-option.wrong {
    background: rgba(198, 40, 40, 0.1);
    border-color: #c62828;
    opacity: 0.8;
}

.mcq-option.wrong .opt-badge {
    background: #c62828;
    color: white;
}

.mcq-options-grid.manzil-layout .mcq-option {
    padding: 8px 12px;
    font-size: 0.95rem;
    min-height: auto;
    gap: 10px;
}

.mcq-options-grid.manzil-layout .mcq-option .opt-badge {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
}

.inline-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding-bottom: 20px;
    width: 100%;
}

.nav-btn-royal {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 15px;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-prev {
    background: linear-gradient(135deg, #7f8c8d, #2c3e50);
    box-shadow: 0 4px 0 #34495e;
}

.btn-next {
    background: linear-gradient(135deg, var(--jodhpur-blue), #003380);
    box-shadow: 0 4px 0 #002255;
}

.nav-btn-royal:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* =========================================
   SHOP & FLASHCARDS
   ========================================= */
.shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 15px;
}

.shop-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.shop-item.owned {
    border-color: var(--success-green);
}

.shop-item.equipped {
    border-color: var(--royal-maroon);
    background: rgba(128, 0, 0, 0.05);
}

.item-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

.item-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.btn-buy {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    color: white;
}

.btn-buy.locked {
    background: var(--royal-maroon);
}

.btn-buy.equip {
    background: var(--jodhpur-blue);
}

.btn-buy.active {
    background: var(--success-green);
    cursor: default;
}

.fc-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    overflow: hidden;
    padding: 20px;
}

.flashcard-container {
    width: 100%;
    max-width: 320px;
    height: 420px;
    position: relative;
    cursor: pointer;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.slide-out-left {
    transform: translateX(-120%) rotate(-20deg) !important;
    opacity: 0;
}

.slide-out-right {
    transform: translateX(120%) rotate(20deg) !important;
    opacity: 0;
}

.slide-in-up {
    animation: slideInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px) scale(0.9);
        opacity: 0;
    }
    
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard-inner.flipped {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--desert-gold);
    background: var(--card-bg);
}

.flashcard-front {
    background: radial-gradient(circle at center, var(--card-bg), var(--screen-bg));
}

.flashcard-back {
    transform: rotateY(180deg);
    background: var(--fort-sand);
    color: var(--royal-maroon);
    border-color: var(--royal-maroon);
}

.fc-btn-row {
    padding: 20px;
    display: flex;
    gap: 20px;
    justify-content: center;
    padding-bottom: 40px;
}

.fc-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s;
}

.fc-btn:active {
    transform: scale(0.9);
}

.fc-no {
    background: #e74c3c;
}

.fc-yes {
    background: #2ecc71;
}

/* =========================================
   MODALS & OVERLAYS
   ========================================= */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.res-card {
    width: 100%;
    max-width: 350px;
    background: var(--card-bg);
    padding: 25px 20px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid var(--desert-gold);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    color: var(--text-dark);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.intro-list {
    text-align: left;
    margin: 15px 0;
    font-size: 0.95rem;
    color: #555;
}

.intro-list div {
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
    display: flex;
    align-items: center;
    gap: 10px;
}

.intro-list i {
    color: var(--royal-maroon);
    width: 20px;
    text-align: center;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #eee;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.modal-close-btn:hover {
    background: #c62828;
    color: white;
}

.exit-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-exit-action {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}

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

.btn-stay {
    background: var(--success-green);
    color: white;
    box-shadow: 0 4px 0 #1b5e20;
}

.btn-leave {
    background: white;
    color: #c62828;
    border: 2px solid #c62828;
}

.bet-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.bet-chip {
    background: var(--screen-bg);
    border: 2px solid var(--desert-gold);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    color: var(--royal-maroon);
    font-weight: bold;
}

.bet-chip:hover {
    background: var(--desert-gold);
    color: white;
}

#palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 10px;
    overflow-y: auto;
    max-height: 50vh;
    padding: 10px;
    margin-bottom: 10px;
}

.pal-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--screen-bg);
    color: #555;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Hind', sans-serif;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pal-item:hover {
    transform: scale(1.1);
}

.pal-item.att {
    background: var(--success-green);
    color: white;
    border-color: var(--success-green);
}

.pal-item.unatt {
    background: #c62828;
    color: white;
    border-color: #c62828;
}

.pal-item.skipped {
    background: #7f8c8d;
    color: white;
    border-color: #7f8c8d;
}

.pal-item.current {
    border: 3px solid var(--jodhpur-blue);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    
    to {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }
    
    50% {
        transform: translateY(-10px);
    }
}

.loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--screen-bg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}


/* =========================================
   ROYAL RANK CARD (WHITE THEME)
   ========================================= */
.royal-rank-card {
    grid-column: span 2;
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    /* Align to top */
    gap: 15px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--royal-maroon);
    /* Optional nice accent */
    margin-top: 10px;
}

/* Icon (Tractor/Crown) */
.r-icon-section {
    font-size: 2.5rem;
    background: #f5f5f5;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Content Area */
.r-content-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Top Row: Title + Badge */
.r-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.r-text-group {
    display: flex;
    flex-direction: column;
}

.r-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.r-title {
    font-family: 'Yatra One', serif;
    font-size: 1.8rem;
    color: var(--royal-maroon);
    /* Red Title */
    line-height: 1.1;
    margin-top: 2px;
}

/* Points Badge (Red Box, Yellow Text) */
.r-points-badge {
    background: var(--royal-maroon);
    color: #ffd700;
    /* Gold Text */
    font-weight: bold;
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(128, 0, 0, 0.3);
}

/* Progress Bar */
.r-progress-track {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.r-progress-fill {
    height: 100%;
    /* Gradient exactly like image */
    background: linear-gradient(90deg, var(--royal-maroon), #d4af37);
    width: 0%;
    border-radius: 10px;
    transition: width 1s ease-out;
}

/* Footer Text (Agli Padvi) */
.r-footer-text {
    text-align: right;
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
    margin-top: 2px;
}

/* Mobile Adjustments */
@media (max-width: 360px) {
    .royal-rank-card {
        padding: 15px;
        gap: 10px;
    }
    
    .r-icon-section {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .r-title {
        font-size: 1.5rem;
    }
}

/* =========================================
   SCORECARD STYLES
   ========================================= */
.score-chart-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 10px auto 20px auto;
    border-radius: 50%;
    background: conic-gradient(#ddd 0% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.score-chart-inner {
    width: 110px;
    height: 110px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.final-score-text {
    font-family: 'Yatra One', serif;
    font-size: 2.2rem;
    color: var(--royal-maroon);
    line-height: 1;
}

.final-score-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
}

.stat-grid-royal {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.stat-box {
    background: var(--screen-bg);
    padding: 10px 5px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-box.correct {
    border-bottom: 3px solid var(--success-green);
}

.stat-box.wrong {
    border-bottom: 3px solid #c62828;
}

.stat-box.skipped {
    border-bottom: 3px solid #7f8c8d;
}

.sb-val {
    font-size: 1.2rem;
    font-weight: 800;
    display: block;
}

.sb-lbl {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
}

.accuracy-pill {
    background: var(--desert-gold);
    color: var(--royal-maroon);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* =========================================
   RAJPATRA (CERTIFICATE) STYLES
   ========================================= */
.cert-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--desert-gold);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    margin: 15px 0;
    text-align: center;
    background: var(--screen-bg);
    color: var(--royal-maroon);
}

#hidden-cert-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -100;
    opacity: 0;
    pointer-events: none;
}

.cert-royal-node {
    width: 900px;
    height: 640px;
    background: #fff;
    border: 25px solid var(--royal-maroon);
    padding: 10px;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    color: #000;
    font-smoothing: antialiased;
}

.cert-inner-border {
    width: 100%;
    height: 100%;
    border: 5px solid var(--desert-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: #fff;
}

.cert-header {
    font-family: 'Yatra One', serif;
    font-size: 4rem;
    color: var(--royal-maroon);
    text-transform: uppercase;
    margin-top: 40px;
    line-height: 1;
    text-shadow: 2px 2px 0px var(--desert-gold);
}

.cert-sub {
    font-family: 'Rozha One', serif;
    font-size: 1.4rem;
    color: var(--jodhpur-blue);
    letter-spacing: 4px;
    text-transform: uppercase;
    border-bottom: 3px solid var(--desert-gold);
    padding-bottom: 5px;
    margin-bottom: 25px;
    margin-top: 5px;
    font-weight: bold;
}

.cert-body {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    color: #222;
    font-size: 1.3rem;
    margin-bottom: 5px;
    font-weight: 500;
    width: 80%;
}

.cert-name {
    font-family: 'Yatra One', serif;
    font-size: 3.5rem;
    color: var(--royal-maroon);
    margin: 5px 0 10px 0;
    display: block;
    text-transform: capitalize;
    white-space: nowrap;
}

.cert-stats-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
    gap: 30px;
}

.cert-stat {
    text-align: center;
    border: 3px solid var(--desert-gold);
    padding: 10px 15px;
    background: #fff;
    min-width: 160px;
    border-radius: 12px;
    box-shadow: 0 4px 0 rgba(128, 0, 0, 0.1);
    position: relative;
    z-index: 5;
}

.cs-val {
    font-family: 'Yatra One', sans-serif;
    font-size: 1.6rem;
    color: var(--royal-maroon) !important;
    display: block;
    line-height: 1.1;
    white-space: nowrap;
}

.cs-lbl {
    font-size: 0.9rem;
    color: #444;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

.cert-badge {
    font-size: 4.5rem;
    display: block;
    line-height: 1;
    margin-top: -10px;
}

.cert-footer {
    position: absolute;
    bottom: 25px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.cert-sign {
    text-align: center;
}

.cert-url-top {
    position: absolute;
    top: 20px;
    right: 25px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--royal-maroon);
    font-weight: 800;
}

.c-corner {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 5px solid var(--royal-maroon);
}

.tl {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.tr {
    top: 10px;
    right: 10px;
    border-left: none;
    border-bottom: none;
}

.bl {
    bottom: 10px;
    left: 10px;
    border-right: none;
    border-top: none;
}

.br {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

/* =========================================
   DAILY CHALLENGE CARD
   ========================================= */
.farmaan-card {
    background: radial-gradient(circle, #fff9c4, #fff176);
    border: 2px solid var(--royal-maroon);
    grid-column: span 2;
    flex-direction: row;
    justify-content: flex-start;
    color: var(--royal-maroon);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    margin-bottom: 10px;
}

.farmaan-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--royal-maroon);
    color: white;
    font-size: 0.7rem;
    padding: 4px 12px;
    border-bottom-left-radius: 10px;
    font-weight: bold;
    z-index: 2;
}

.farmaan-stamp {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%) rotate(-15deg);
    font-family: 'Yatra One';
    border: 4px double var(--success-green);
    color: var(--success-green);
    padding: 5px 15px;
    border-radius: 10px;
    font-size: 1.4rem;
    text-transform: uppercase;
    display: none;
    background: rgba(255, 255, 255, 0.7);
}

.farmaan-card.done .farmaan-stamp {
    display: block;
}

.farmaan-card.done {
    filter: grayscale(0.8);
    cursor: default;
}

/* =========================================
   SEARCH & RATTA STYLES
   ========================================= */
.search-card,
.ratta-card {
    background: var(--card-bg);
    border-left: 5px solid var(--royal-maroon);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    /* Fix width */
}

.ratta-card {
    border-left-color: var(--success-green);
}

.s-q {
    font-weight: 700;
    font-family: 'Mukta', sans-serif;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.s-a {
    font-size: 0.95rem;
    color: var(--success-green);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s-highlight {
    background: #fff59d;
    padding: 0 2px;
}

/* =========================================
   STREAK FIRE ANIMATION
   ========================================= */
.streak-fire {
    color: #fff;
    animation: firePulse 1.5s infinite alternate;
}

@keyframes firePulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px orange);
    }
    
    100% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 5px yellow);
    }
}

/* =========================================
   CHAI PANI (SUPPORT)
   ========================================= */
.qr-frame {
    background: white;
    padding: 15px;
    border: 4px double var(--desert-gold);
    border-radius: 15px;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.qr-img {
    width: 160px;
    height: 160px;
    display: block;
}

/* =========================================
   THEMES
   ========================================= */
/* Marwar (Jodhpur Blue) */
body.theme-marwar {
    --royal-maroon: #004aad;
    --jaipur-pink: #64b5f6;
}

/* Mewar (Red & Yellow) */
body.theme-mewar {
    --royal-maroon: #b71c1c;
    --desert-gold: #ffd700;
    --jaipur-pink: #ff6f00;
}

/* Shekhawati (Green) */
body.theme-shekhawati {
    --royal-maroon: #1b5e20;
    --jaipur-pink: #81c784;
    --desert-gold: #cddc39;
}

/* Jaipur (Pink) */
body.theme-jaipur {
    --royal-maroon: #c2185b;
    --desert-gold: #f8bbd0;
}

.theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 10px;
}

.theme-option {
    background: var(--screen-bg);
    border: 2px solid #ccc;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.theme-option:active {
    transform: scale(0.95);
}

.t-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.theme-option span {
    font-weight: bold;
    font-size: 0.85rem;
    color: #555;
}

/* New Scroll Container Wrapper */
.home-scroll-area {
    flex-grow: 1;
    overflow-y: auto;
    /* This makes the wrapper scrollable */
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
    /* Move bottom padding here */
}

/* =========================================
   NEW ROYAL TOPIC CARDS (RAJASTHANI STYLE)
   ========================================= */

.topic-card-royal {
    background: var(--card-bg);
    /* Royal Gold Border & 3D Effect */
    border: 2px solid var(--border-color);
    border-bottom: 5px solid var(--desert-gold);
    border-radius: 20px;
    /* Soft rounded corners */
    
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    aspect-ratio: 1;
    /* Forces Square Shape */
    padding: 10px;
    cursor: pointer;
    
    /* Smooth Bouncy Transition */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* BANDHANI TEXTURE (Background Pattern) */
.topic-card-royal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Creates a subtle dotted pattern like Bandhani fabric */
    background-image: radial-gradient(var(--desert-gold) 1.5px, transparent 1.5px);
    background-size: 12px 12px;
    opacity: 0.15;
    z-index: 0;
}

/* Hover / Touch State */
.topic-card-royal:active {
    transform: scale(0.92);
    /* Shrink slightly */
    border-bottom-width: 2px;
    /* Press down effect */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Icon Styling */
.t-icon-frame {
    width: 50px;
    height: 50px;
    background: rgba(128, 0, 0, 0.08);
    /* Faint Maroon Bg */
    border-radius: 50%;
    /* Circle Frame */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    z-index: 1;
    transition: transform 0.3s ease;
    border: 1px dashed var(--desert-gold);
}

.t-icon-frame i {
    font-size: 1.6rem;
    color: var(--royal-maroon);
}

/* Icon Animation on Hover */
.topic-card-royal:hover .t-icon-frame {
    transform: rotate(15deg) scale(1.1);
    background: var(--royal-maroon);
    border-color: var(--royal-maroon);
}

.topic-card-royal:hover .t-icon-frame i {
    color: #fff;
    /* Icon turns white */
}

/* Title Styling */
.t-title {
    font-family: 'Yatra One', serif;
    /* Hindi/Rajasthani style font */
    font-size: 0.95rem;
    color: var(--text-dark);
    z-index: 1;
    line-height: 1.2;
    font-weight: normal;
    text-transform: capitalize;
}

/* Coming Soon Label */
.t-tag {
    font-size: 0.6rem;
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 5px;
    color: #888;
    z-index: 1;
    font-weight: bold;
}

/* =========================================
   NEW: SECTION HEADER (Sticky)
   ========================================= */
.section-header-royal {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card-bg);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--desert-gold);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    
    to {
        transform: translateY(0);
    }
}

.sh-title {
    font-family: 'Yatra One', serif;
    font-size: 1.4rem;
    color: var(--royal-maroon);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   ROYAL MANZIL CARD (Attractive Design)
   ========================================= */
.manzil-card-royal {
    background: var(--card-bg);
    margin-bottom: 12px;
    border-radius: 12px;
    border-left: 6px solid var(--royal-maroon);
    border-right: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
    animation: slideInRight 0.4s ease forwards;
    opacity: 0;
    /* Hidden initially for animation */
}

/* Texture Pattern */
.manzil-card-royal::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 90px;
    height: 90px;
    background-image: radial-gradient(#d4af37 2px, transparent 2px);
    background-size: 10px 10px;
    opacity: 0.15;
    border-radius: 50%;
    pointer-events: none;
}

/* Hover Effect */
.manzil-card-royal:active {
    transform: scale(0.98);
}

.mz-icon-box {
    width: 48px;
    height: 48px;
    background: #fff9c4;
    border: 1px solid var(--desert-gold);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--royal-maroon);
    flex-shrink: 0;
}

.mz-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mz-title {
    font-family: 'Yatra One', serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.mz-meta {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mz-arrow {
    color: #ccc;
    font-size: 1rem;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }
    
    50% {
        transform: translateY(-20px);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================================
   FIX: KHOJ & RATTA SCROLLING
   ========================================= */

/* 1. Reset Layout for these lists (Remove Grid, Add Scroll) */
#khoj-results,
#ratta-list {
    display: flex !important;
    /* Use Flex instead of Grid */
    flex-direction: column;
    /* Stack items vertically */
    gap: 10px;
    /* Space between cards */
    overflow-y: auto !important;
    /* FORCE SCROLLING */
    flex-grow: 1;
    /* Take all available screen space */
    padding: 15px;
    width: 100%;
    height: 100%;
    /* Ensure it fills height to allow scroll */
}

/* 2. Ensure the parent screens handle height correctly */
#scr-khoj,
#scr-ratta {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Full Screen Height */
    overflow: hidden;
    /* Prevent double scrollbars */
}

/* 3. Fix the "Load More" button in Ratta Maar */
#btn-load-more {
    margin: 10px;
    flex-shrink: 0;
    /* Prevent button from being squashed */
    z-index: 10;
    background: var(--royal-maroon);
    color: white;
    padding: 15px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

/* 4. Fix Card Widths inside these lists */
.search-card,
.ratta-card {
    width: 100%;
    flex-shrink: 0;
    /* Don't shrink when list is long */
}

/* =========================================
   FIX: HEADER, SCROLLING & LOAD MORE BUTTON
   ========================================= */

/* 1. Fix the Screens to allow full height layout */
#scr-ratta,
#scr-khoj {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    /* Fill the screen */
    background: var(--screen-bg);
}

/* 2. Fix the Lists (Switch to Vertical List + Enable Scroll) */
#ratta-list,
#khoj-results {
    flex-grow: 1;
    /* Take all available space */
    overflow-y: auto;
    /* Enable Scrolling */
    padding: 15px;
    display: flex;
    /* Use Flexbox */
    flex-direction: column;
    /* Stack items vertically (List view) */
    gap: 15px;
    /* Space between cards */
    width: 100%;
}

/* 3. Fix the "Load More" Button (Give it "Air") */
#btn-load-more {
    margin: 15px;
    /* Space around the button */
    padding: 15px;
    background: var(--royal-maroon);
    color: white;
    border-radius: 12px;
    /* Rounded corners */
    border: 2px solid var(--desert-gold);
    font-family: 'Yatra One', serif;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    /* Floating shadow */
    flex-shrink: 0;
    /* Don't let it shrink */
    cursor: pointer;
}

#btn-load-more:active {
    transform: scale(0.98);
}

/* 4. Ensure Headers are Full Width (Like Jhatpat Gyaan) */
.top-bar {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    /* Default for 3-item headers */
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: var(--card-bg);
    border-bottom: 3px solid var(--desert-gold);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 50;
    flex-shrink: 0;
}

/* 5. Fix the Cards inside Ratta/Khoj to look good in List View */
.ratta-card,
.search-card {
    width: 100%;
    /* Full width */
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--success-green);
    /* Green accent for Ratta */
}

.search-card {
    border-left-color: var(--royal-maroon);
    /* Maroon accent for Search */
}

/* Fix text size in headers */
.top-bar div {
    font-family: 'Yatra One', serif;
    font-size: 1.3rem;
    color: var(--royal-maroon);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   FIX: GAME HEADER LAYOUT & TIMER
   ========================================= */

/* Force 4 columns for the Game Screen Header: 
   1. Home Btn | 2. Palette Btn | 3. Timer (Flexible) | 4. Submit Btn */
#scr-game .top-bar {
    display: grid !important;
    grid-template-columns: auto auto 1fr auto !important;
    gap: 10px;
    align-items: center;
}

/* Ensure the timer container fills the middle space and centers the timer */
#timer-container {
    width: 100%;
    display: flex;
    justify-content: center;
    /* Centers timer horizontally */
    align-items: center;
}

/* Ensure the timer text is visible and styled correctly */
.timer-royal {
    margin: 0 !important;
    /* Remove auto margins that might fight with flexbox */
    background: var(--royal-maroon);
    color: var(--screen-bg);
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Fix for Mobile: If screen is very small, adjust text size */
@media (max-width: 360px) {
    .btn-submit-royal span {
        display: none;
        /* Hide text "Jama Karo" on tiny screens, show only icon */
    }
    
    .timer-royal {
        font-size: 0.9rem;
        padding: 5px 10px;
        min-width: auto;
    }
}


/* =========================================
   FIX: TIMER TEXT VISIBILITY
   ========================================= */

#scr-game .top-bar {
    /* Ensure the grid layout is strictly enforced */
    display: grid !important;
    grid-template-columns: auto auto 1fr auto !important;
    align-items: center;
}

#timer-container {
    /* Center the timer box in the middle space */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timer-royal {
    /* 1. Force layout to center text */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* 2. Force Text Color to WHITE to be 100% visible on Red */
    color: #ffffff !important;
    
    /* 3. Ensure Font works (with fallback) */
    font-family: 'Yatra One', sans-serif !important;
    font-size: 1.1rem !important;
    
    /* 4. Reset margins/padding to prevent clipping */
    margin: 0 !important;
    padding: 5px 15px !important;
    height: auto !important;
    min-height: 35px;
    line-height: 1 !important;
}

#explain-box {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    font-size: 1rem;
}

/* Night mode support */
body.night-mode #explain-box {
    background: #2c1a1a !important;
    color: #e0e0e0 !important;
    border-color: #444;
}

.explain-box-royal {
    margin-top: 20px;
    padding: 15px;
    background: #fff9e6;
    /* Light cream/gold bg */
    border-left: 5px solid var(--desert-gold);
    border-radius: 10px;
    text-align: left;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.4s ease;
}

body.night-mode .explain-box-royal {
    background: #1e1e1e;
    border-color: #444;
}

/* Ensure only the active screen is visible and takes up space */
.screen {
    display: none !important;
}

.screen.active {
    display: flex !important;
}

/* Add this to the bottom of style.css */
.s-highlight {
    background-color: #fff59d;
    /* Bright yellow highlight */
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: bold;
}

.search-card {
    border-left: 5px solid var(--royal-maroon);
    padding: 15px;
    margin-bottom: 12px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.manzil-card-royal.mz-locked {
    filter: grayscale(1);
    opacity: 0.7;
    cursor: not-allowed;
    border-color: #ccc !important;
    background: #f9f9f9 !important;
}

.mz-locked .mz-icon-box {
    background: #999 !important;
}

/* Disable text selection across the entire app frame */
.app-frame {
    -webkit-touch-callout: none;
    /* iOS Safari */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* Non-prefixed version, currently supported by Chrome and Opera */
}

/* Optional: Re-enable selection for inputs (like the certificate name) */
input,
textarea {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Podium Animations */
#podium-area>div {
    animation: slideInUp 0.6s ease-out forwards;
}

#podium-area>div:nth-child(1) {
    animation-delay: 0.2s;
}

/* Silver */
#podium-area>div:nth-child(2) {
    animation-delay: 0s;
}

/* Gold */
#podium-area>div:nth-child(3) {
    animation-delay: 0.4s;
}

/* Bronze */

/* Sticky Rank Bar at Bottom */
#login-user-rank-bar {
    animation: slideInUp 0.4s ease-out;
}

/* Styling for the expanded grid state */
.royal-menu-grid[data-expanded="true"] {
    margin-bottom: 20px;
}

/* Optional: Different style for View All card */
.menu-card:last-child {
    border: 1px dashed #ccc;
}

/* Animation only runs when this class is present */
.menu-anim {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.4s ease forwards;
}

/* Ensure smooth transition for the expansion */
.royal-menu-grid {
    transition: all 0.3s ease-in-out;
}

/* Only one screen should be active at a time */
.screen {
    display: none !important;
}

.screen.active {
    display: flex !important;
}

.pass-container {
    display: flex;
    align-items: center;
}

.toggle-password:active {
    color: var(--royal-maroon) !important;
    transform: translateY(-50%) scale(0.9);
}

/* Sidebar Styles */
.royal-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    /* Hidden by default */
    width: 280px;
    height: 100%;
    background: white;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
}

.royal-sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-header {
    background: var(--royal-maroon);
    padding: 30px 20px;
    color: white;
    position: relative;
}

.close-sidebar {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
}

.sidebar-user-info h3 {
    font-family: 'Yatra One';
    margin-top: 10px;
}

.sidebar-user-info p {
    font-size: 0.8rem;
    opacity: 0.8;
}

.sidebar-stats-row {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: #fdf8ef;
    border-bottom: 1px solid #eee;
}

.sidebar-menu {
    padding: 10px 0;
}

.side-item {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
}

.side-item i {
    width: 20px;
    color: var(--royal-maroon);
}

.side-item.delete {
    color: #c62828;
}

.side-item:active {
    background: #f5f5f5;
}

/* Header adjustments */
.header-menu-icon {
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
}

/* style.css additions */

/* Remove old rank card styles */
.royal-rank-card {
    display: none !important;
}

/* New Leaderboard UI */
.rank-container {
    background: linear-gradient(to bottom, #fffcf5, #f4e4bc);
}

#podium-area {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 60px 10px 25px 10px;
    /* Increased top padding for breathing room */
    background: linear-gradient(to bottom, var(--fort-sand), #fdf8ef);
    min-height: 260px;
}

.podium-name {
    color: white;
    font-family: 'Yatra One', serif;
    font-size: 0.85rem;
    margin-top: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    margin: 0 15px 10px 15px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.rank-number {
    font-family: 'Yatra One';
    font-size: 1.2rem;
    width: 35px;
    color: var(--royal-maroon);
}

.user-meta {
    flex: 1;
    margin-left: 10px;
}

.user-score-badge {
    background: var(--fort-sand);
    color: var(--royal-maroon);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.9rem;
}

/* SHAHI DARBAR THEME */
.podium-pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
    position: relative;
}

.royal-kalangi {
    position: absolute;
    top: -35px;
    font-size: 2rem;
    filter: drop-shadow(0 0 5px gold);
    animation: float 3s infinite;
}

.podium-avatar {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    border: 4px solid #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.podium-label {
    color: #f4e4bc;
    font-family: 'Yatra One';
    font-size: 0.7rem;
    margin: 5px 0;
    text-transform: uppercase;
}

.podium-base {
    width: 100%;
    border-radius: 15px 15px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 5px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.p-rank {
    font-family: 'Mukta';
    font-weight: 900;
    font-size: 1.2rem;
    color: #333;
}

.p-name {
    font-size: 0.75rem;
    color: #4a0000;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 90%;
    text-align: center;
}

/* LIST DESIGN */
.darbar-heading {
    text-align: center;
    font-family: 'Yatra One';
    color: #800000;
    margin: 20px 0 10px 0;
    font-size: 1.2rem;
    border-bottom: 2px solid #d4af37;
    display: inline-block;
    align-self: center;
}

.darbar-row {
    background: white;
    margin: 5px 15px;
    padding: 12px 20px;
    border-radius: 50px;
    /* Rajasthani Scroll style */
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #e6d5b8;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.darbar-rank {
    font-family: 'Yatra One';
    color: #800000;
    font-size: 1.1rem;
    width: 30px;
}

.darbar-icon {
    font-size: 1.8rem;
}

.darbar-info {
    flex: 1;
}

.darbar-name {
    font-weight: 700;
    font-family: 'Hind';
    font-size: 0.95rem;
    color: #333;
}

.darbar-pts {
    font-size: 0.75rem;
    color: #d4af37;
    font-weight: 900;
}

/* USER STICKY BAR */
#login-user-rank-bar {
    background: #800000;
    border-top: 3px solid #d4af37;
    padding: 15px 25px;
    justify-content: space-between;
    align-items: center;
    border-radius: 25px 25px 0 0;
}

.user-rank-badge {
    background: #d4af37;
    color: #800000;
    font-family: 'Yatra One';
    padding: 5px 15px;
    border-radius: 10px;
}

.user-rank-text {
    font-family: 'Yatra One';
    color: #f4e4bc;
}

.user-rank-score {
    font-family: 'Mukta';
    font-weight: bold;
    color: white;
}

/* OLYMPIC PODIUM REDESIGN */

/* Bandhani Texture Background */
#podium-area::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(212, 175, 55, 0.2) 2px, transparent 2px);
    background-size: 20px 20px;
}

.olympic-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
    margin: 0 5px;
    z-index: 5;
    animation: slideInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.podium-medal-focal {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: -15px;
    z-index: 10;
    border: 4px solid #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Special Pulsing Glow for Gold */
.gold-glow {
    animation: goldPulse 2s infinite;
    box-shadow: 0 0 20px #ffd700, 0 0 40px rgba(255, 215, 0, 0.5);
}

@keyframes goldPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 15px #ffd700;
    }
    
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px #ffd700;
    }
    
    100% {
        transform: scale(1);
        box-shadow: 0 0 15px #ffd700;
    }
}

.podium-base {
    width: 100%;
    border-radius: 15px 15px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 5px 10px 5px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Tiered Step Heights */
.step-1 .podium-base {
    height: 180px;
}

/* Maharathi Step */
.step-2 .podium-base {
    height: 130px;
}

/* Surveer Step */
.step-3 .podium-base {
    height: 100px;
}

/* Yoddha Step */

.podium-rank-num {
    font-family: 'Yatra One';
    font-size: 2.5rem;
    color: rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.podium-user-name {
    font-family: 'Mukta';
    font-weight: 800;
    color: #fff;
    font-size: 0.9rem;
    margin-top: 5px;
    text-shadow: 2px 2px 4px #000;
}

/* Modern List Design */
.darbar-row {
    background: #ffffff;
    margin: 10px 20px;
    padding: 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #f4e4bc;
    box-shadow: 0 5px 15px rgba(128, 0, 0, 0.05);
}

.user-rank-card-floating {
    background: linear-gradient(135deg, #800000, #4a0000);
    padding: 10px 15px;
    border-radius: 15px;
    border: 3px solid #d4af37;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 15px 30px rgba(128, 0, 0, 0.4);
    animation: slideInUp 0.5s ease-out;
    margin: 0 0 100px 0;
}

/* FIXED FLOATING USER RANK BAR */
#login-user-rank-bar {
    position: absolute !important;
    bottom: 25px !important;
    /* Floating above the very bottom */
    left: 15px !important;
    right: 15px !important;
    background: transparent !important;
    padding: 0 !important;
    z-index: 200 !important;
    /* Ensure it stays above the list */
    border-radius: 0 !important;
    box-shadow: none !important;
}


/* Add subtle royal texture */
.user-rank-card-floating::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(212, 175, 55, 0.15) 1px, transparent 1px);
    background-size: 15px 15px;
    pointer-events: none;
}

.u-rank-section {
    text-align: center;
    min-width: 60px;
}

.u-rank-label {
    font-size: 0.65rem;
    color: #f4e4bc;
    text-transform: uppercase;
    font-weight: bold;
}

.u-rank-number {
    font-family: 'Yatra One';
    font-size: 1.4rem;
    color: #ffd700;
    line-height: 1.1;
}

.u-rank-divider {
    width: 2px;
    height: 35px;
    background: rgba(212, 175, 55, 0.3);
    margin: 0 15px;
}

.u-rank-main-info {
    flex: 1;
}

.u-rank-name {
    font-family: 'Yatra One';
    font-size: 1rem;
    color: #fff;
    line-height: 1.2;
}

.u-rank-points {
    font-size: 0.75rem;
    color: #d4af37;
    font-weight: bold;
}

.u-rank-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Ensure the leaderboard list has enough padding at the bottom to scroll past the floating bar */
#leaderboard-list {
    padding-bottom: 120px !important;
}

#podium-area {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 60px 10px 25px 10px;
    /* Increased top padding for breathing room */
    background: linear-gradient(to bottom, var(--fort-sand), #fdf8ef);
    min-height: 260px;
}

.olympic-step {
    flex: 1;
    max-width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Fixed heights to prevent medals from touching the top */
.step-1 {
    height: 170px !important;
}

/* Gold - Center */
.step-2 {
    height: 120px !important;
}

/* Silver - Left */
.step-3 {
    height: 90px !important;
}

/* Bronze - Right */

.podium-medal-focal {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto -25px auto;
    /* Overlap effect */
    position: relative;
    z-index: 2;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.podium-base {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 12px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

/* Ensure the screen can scroll */
#scr-rankboard {
    display: none;
    height: 100vh;
    flex-direction: column;
}

#scr-rankboard.active {
    display: flex;
}

.rank-container {
    flex: 1;
    overflow-y: auto !important;
    /* Forces scrollability */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 120px !important;
    /* Space for the floating bar */
}

/* Designing the floating bar so it doesn't block scrolls */
#login-user-rank-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    z-index: 1000;
    pointer-events: none;
    /* Allows scrolling through the empty space */
}

.farmaan-popup {
    background: #fdf8ef !important;
    /* Paper Color */
    border: 3px solid var(--desert-gold) !important;
    padding: 0 !important;
    overflow: hidden;
    max-width: 320px;
}

.farmaan-content-area {
    padding: 25px;
    background-image: radial-gradient(rgba(212, 175, 55, 0.1) 1px, transparent 1px);
    background-size: 15px 15px;
}

.farmaan-scroll-top,
.farmaan-scroll-bottom {
    height: 15px;
    background: repeating-linear-gradient(90deg, #800000, #800000 20px, #d4af37 20px, #d4af37 40px);
    width: 100%;
}

/* Animation for the scroll opening */
.farmaan-popup {
    animation: openScroll 0.5s ease-out;
}

@keyframes openScroll {
    from {
        transform: scaleY(0);
        opacity: 0;
    }
    
    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

.rank-item {
    transition: transform 0.2s ease;
}

.rank-item:active {
    transform: scale(0.98);
}

.rank-item-me {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    
    70% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }
    
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.rank-item-me {
    animation: gold-pulse 2s infinite;
}

@keyframes gold-pulse {
    0% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.4);
    }
    
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.7);
    }
    
    100% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.4);
    }
}

/* Animation for the refresh icon when clicked */
.refresh-spin {
    animation: fa-spin 0.8s ease-in-out;
}

/* Ensure the top bar in rankboard uses the full space */
#scr-rankboard .top-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 15px;
}

.side-item i.fa-telegram-plane {
    color: #0088cc;
    font-size: 25px;
    /* Telegram Official Blue */
}

.side-item:hover i.fa-telegram-plane {
    transform: scale(1.2) rotate(-10deg);
    transition: transform 0.2s ease;
}

.padvi-badge {
    font-size: 0.65rem;
    font-weight: 800;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ensure the leaderboard row adjusts for the badge */
.darbar-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.darbar-name {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

/* Podium Step Heights */
.olympic-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 100px;
}

/* Height difference for the Olympic look */
.step-1 .podium-base {
    height: 140px;
}

/* Gold - Center */
.step-2 .podium-base {
    height: 110px;
}

/* Silver - Left */
.step-3 .podium-base {
    height: 100px;
}

/* Bronze - Right */

.podium-medal-focal {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: -15px;
    /* Overlap effect */
    position: relative;
    z-index: 2;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.podium-base {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 15px;
    text-align: center;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.podium-user-name {
    color: white;
    font-family: 'Mukta', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 90%;
    margin: 0 auto;
}

.gold-glow {
    animation: goldPulse 2s infinite;
}

@keyframes goldPulse {
    0% {
        box-shadow: 0 0 5px #ffd700;
    }
    
    50% {
        box-shadow: 0 0 20px #ffd700;
    }
    
    100% {
        box-shadow: 0 0 5px #ffd700;
    }
}

.health-track {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}


.player-zone #p1-avatar,
.player-zone #p2-avatar {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.emote-bar button:active {
    transform: scale(1.4);
}

.rank-item-me {
    border: 2px solid var(--desert-gold) !important;
}

/* Emote Animation */
.emote-bar button {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.emote-bar button:hover {
    transform: scale(1.3);
}

.emote-bar button:active {
    transform: scale(0.9);
}

/* Health Bar Polish */
.health-track {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
}


/* Battle Screen Background */
#scr-battle {
    background-color: var(--fort-sand);
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
}

.ranbhoomi-card .m-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

/* Ensure the FontAwesome icon for Random Battle is visible */
.fa-shuffle,
.fa-shield-halved,
.fa-hand-fist {
    display: inline-block;
    vertical-align: middle;
}

/* Fix input padding for mobile */
#room-code-input {
    -moz-appearance: textfield;
}

#room-code-input::-webkit-outer-spin-button,
#room-code-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Battle Feedback Styles */
.mcq-option.battle-correct {
    border: 3px solid #4caf50 !important;
    background: rgba(76, 175, 80, 0.1);
}

.mcq-option.battle-correct .feedback-circle {
    background: #4caf50;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    right: 15px;
}

.mcq-option.battle-correct .feedback-circle::after {
    content: '✔';
    color: white;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mcq-option.battle-wrong {
    border: 3px solid #f44336 !important;
    background: rgba(244, 67, 54, 0.1);
}

.mcq-option.battle-wrong .feedback-circle {
    background: #f44336;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    right: 15px;
}

.mcq-option.battle-wrong .feedback-circle::after {
    content: '✖';
    color: white;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mcq-option {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

/* Battle Mode Specific UI Tweaks */
#scr-battle .quiz-area {
    padding: 15px;
    height: auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#battle-q {
    line-height: 1.5;
    color: var(--text-dark);
    margin-bottom: 15px;
    word-wrap: break-word;
    white-space: pre-line !important;
    text-align: left;
    display: block;
}

#battle-options .mcq-option {
    font-size: 1rem;
    padding: 12px 15px;
    margin-bottom: 8px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Fix for long questions in battle */
.battle-q-wrapper {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 15px 10px;
    border: 1px dashed var(--desert-gold);
}

.health-track {
    background: #e0e0e0;
    border: 2px solid #5d4037;
    /* Royal frame */
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

@keyframes floatEmote {
    0% {
        transform: translate(-50%, 0) scale(0.5);
        opacity: 0;
    }
    
    20% {
        transform: translate(-50%, -20px) scale(1.2);
        opacity: 1;
    }
    
    100% {
        transform: translate(-50%, -150px) scale(1);
        opacity: 0;
    }
}

.mcq-option {
    position: relative;
    /* ताकि circle सही जगह बैठे */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 40px 12px 15px !important;
    /* Right side में जगह छोड़ें */
}

.feedback-circle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    
    to {
        transform: rotate(360deg);
    }
}

#search-timer-circle {
    transform: rotate(-90deg);
    transform-origin: center;
}

/* Fix for the Searching Modal Cancel Button */
#searching-modal .btn-royal:active {
    transform: scale(0.96);
    background-color: #feebeb;
}

/* Ensure the spinner animation is smooth */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    
    to {
        transform: rotate(360deg);
    }
}

/* Adjusting the search timer orientation */
#search-timer-circle {
    transform: rotate(-90deg);
    transform-origin: center;
}

/* Ensuring modal card padding is consistent */
#searching-modal .res-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Modal Button Polish */
#room-invite-modal .btn-royal:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2e7d32;
}

#room-invite-modal button:last-child:hover {
    background-color: #f9f9f9;
    border-color: #bbb;
}

/* Room ID Pulse Animation */
#display-room-id {
    animation: idPulse 2s infinite;
}

@keyframes idPulse {
    0% {
        opacity: 1;
    }
    
    50% {
        opacity: 0.7;
    }
    
    100% {
        opacity: 1;
    }
}

.floating-emote {
    position: absolute;
    bottom: 150px;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    border: 2px solid var(--desert-gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: floatUpRoyal 2.5s forwards ease-out;
    pointer-events: none;
    display: flex;
    align-items: center;
}

@keyframes floatUpRoyal {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    
    20% {
        transform: translateY(-30px) scale(1.1);
        opacity: 1;
    }
    
    100% {
        transform: translateY(-200px) scale(1);
        opacity: 0;
    }
}

.royal-result-card {
    background: #fff8e1;
    /* Old paper texture color */
    border: 8px double var(--royal-maroon);
    border-radius: 0;
    /* Sharp royal edges */
    padding: 30px;
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 50px rgba(139, 0, 0, 0.1);
}

.result-header h1 {
    color: var(--royal-maroon);
    font-size: 2.5rem;
    margin: 10px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.score-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    background: rgba(139, 0, 0, 0.05);
    padding: 15px;
    border-radius: 10px;
}

.res-avatar {
    font-size: 2.5rem;
}

.vs-divider {
    font-family: 'Yatra One';
    color: var(--desert-gold);
    font-size: 1.2rem;
    font-weight: bold;
}

.rewards-section {
    border-top: 2px solid var(--desert-gold);
    border-bottom: 2px solid var(--desert-gold);
    padding: 15px 0;
    margin-bottom: 20px;
}

.reward-val {
    font-weight: bold;
    color: #2e7d32;
    margin-left: 10px;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.play-again {
    background: var(--success-green) !important;
    flex: 1;
}

.exit-home {
    background: var(--royal-maroon) !important;
    flex: 1;
}

/* Result Card Actions Style */
.result-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 25px;
}

.result-actions .btn-royal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
}

/* Button Click Effect */
.result-actions .btn-royal:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) !important;
}

/* Mobile Screen sathi adjustment */
@media (max-width: 360px) {
    .result-actions {
        flex-direction: column;
        /* Lahan screen war ekakhali ek */
    }
    
    .result-actions .btn-royal {
        width: 100%;
    }
}

#p1-health,
#p2-health {
    height: 100%;
    /* This creates the sliding effect */
    transition: width 0.8s ease-in-out;
    border-radius: 10px;
}


.q-text {
    font-family: 'Mukta', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    white-space: pre-line;
    line-height: 1.5;
    /* Optional: improves readability of multi-line questions */
    text-align: left;
}

/* Golden Glow & Shimmer Effect */
.bday-card-shimmer {
    border: 3px solid #d4af37 !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6), inset 0 0 15px rgba(212, 175, 55, 0.2) !important;
    position: relative;
    overflow: hidden;
}

/* Shimmering Light Streak */
.bday-card-shimmer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transform: rotate(45deg);
    animation: shimmerEffect 3s infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes shimmerEffect {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Fix for Card Size - Compact & scannable */
#birthday-modal .res-card {
    width: 85% !important;
    /* Slightly narrower */
    max-width: 340px !important;
    padding: 0 !important;
    /* Managed by content area */
    border-radius: 15px !important;
}

#birthday-modal .farmaan-content-area {
    padding: 20px 15px !important;
    /* Reduced padding */
}

/* Unique Shimmer for Daily 21 */
.daily-shimmer {
    position: relative;
    overflow: hidden;
}

.daily-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shimmerEffect 3s infinite;
}

/* Specific styling for the Daily 21 result */
.daily-result-badge {
    background: #FFD700;
    color: #800000;
    padding: 10px 20px;
    border-radius: 50px;
    font-family: 'Yatra One';
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    display: inline-block;
    margin: 15px 0;
}

.mc-yellow-glow {
    color: orange;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

/* Exit animations: Slide and fade out */
.q-slide-out-left {
    animation: slideOutLeft 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.q-slide-out-right {
    animation: slideOutRight 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

/* Entry animation: Scale and fade in */
.q-slide-in {
    animation: slideIn 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideOutLeft {
    to {
        transform: translateX(-100px);
        opacity: 0;
    }
}

@keyframes slideOutRight {
    to {
        transform: translateX(100px);
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* This covers Search results, Ratta cards, and Quiz questions */
.s-q,
.s-a,
.q-text,
.ratta-card div {
    white-space: pre-line !important;
}

/* =========================================
   ROYAL RATTA MAAR (SHAHI POTHI DESIGN)
   ========================================= */

/* Main Container Background */
#scr-ratta {
    background-color: var(--fort-sand);
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    /* Optional: Add a subtle Rajasthani arch background if you have one, otherwise texture is fine */
}

/* The Toolbar (Filter & Toggle) */
.ratta-toolbar {
    display: flex;
    gap: 10px;
    padding: 15px 15px 5px 15px;
    align-items: center;
}


/* Eye Toggle Button (Gupchup Mode) */
.btn-eye-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--royal-maroon);
    background: white;
    color: var(--royal-maroon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 0 rgba(128, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-eye-toggle.active {
    background: var(--royal-maroon);
    color: var(--desert-gold);
    border-color: var(--desert-gold);
}

/* --- THE ROYAL CARD --- */
.ratta-card-royal {
    background: #fff;
    border-radius: 15px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e6d5b8;
    animation: slideInUp 0.5s ease forwards;
    transition: transform 0.2s;
}

.ratta-card-royal:active {
    transform: scale(0.98);
}

/* Top Border Pattern (Leheriya/Bandhani vibes) */
.rc-pattern-strip {
    height: 8px;
    background: repeating-linear-gradient(45deg,
            var(--royal-maroon),
            var(--royal-maroon) 10px,
            var(--desert-gold) 10px,
            var(--desert-gold) 20px);
    width: 100%;
}

.rc-content {
    padding: 15px 20px;
}

/* Header Row: Index & Topic */
.rc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rc-number-badge {
    font-family: 'Yatra One', serif;
    background: var(--royal-maroon);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border: 2px solid var(--desert-gold);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.rc-topic-pill {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--royal-maroon);
    background: #fff3e0;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--desert-gold);
}

/* Content Typography */
.rc-question {
    font-family: 'Mukta', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 15px;
}

.rc-answer-box {
    background: #f1f8e9;
    border-left: 4px solid var(--success-green);
    padding: 10px 15px;
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
    color: #2e7d32;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Hidden State (Blur Effect) */
.rc-answer-box.blurred {
    background: #eceff1;
    border-left-color: #b0bec5;
    color: transparent;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.rc-answer-box.blurred::after {
    content: 'Tap to see';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #78909c;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: none;
    text-transform: uppercase;
}

.rc-icon {
    margin-right: 8px;
}

/* Explanation Section */
.rc-explain {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #5d4037;
    font-style: italic;
    padding-top: 10px;
    border-top: 1px dashed #d7ccc8;
}

/* Footer Actions */
.rc-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 10px;
    opacity: 0.6;
}

.rc-action-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
}

.rc-action-btn:hover {
    color: var(--royal-maroon);
    transform: scale(1.1);
}

/* Load More Button - Royal Style */
.btn-royal-load {
    width: calc(100% - 30px);
    margin: 10px 15px 30px 15px;
    background: linear-gradient(135deg, var(--royal-maroon), #5d0000);
    color: #fff;
    border: 2px solid var(--desert-gold);
    padding: 15px;
    font-family: 'Yatra One', serif;
    font-size: 1.2rem;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(128, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

/* Night Mode Overrides */
body.night-mode .ratta-card-royal {
    background: #1e1e1e;
    border-color: #333;
}

body.night-mode .rc-question {
    color: #e0e0e0;
}

body.night-mode .rc-answer-box {
    background: #1b5e20;
    color: #a5d6a7;
    border-left-color: #66bb6a;
}

body.night-mode .rc-answer-box.blurred {
    background: #263238;
    border-left-color: #546e7a;
    color: transparent;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* DROPDOWN ARROW STYLE*/

#ratta-subject-filter {
    flex: 1;
    /* Make space for the arrow on the right */
    padding: 12px 40px 12px 20px; 
    border-radius: 30px;
    border: 2px solid var(--royal-maroon);
    background-color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--royal-maroon);
    box-shadow: 0 4px 0 rgba(128, 0, 0, 0.1);
    outline: none;
    cursor: pointer;

    /* 1. HIDE DEFAULT SYSTEM ARROW */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* 2. ADD CUSTOM SVG ARROW (Royal Maroon) */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23800000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px auto;
}

/* NIGHT MODE ARROW (Gold Color) */
body.night-mode #ratta-subject-filter {
    background-color: #1e1e1e;
    color: #d4af37;
    border-color: #d4af37;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23d4af37%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}


body.night-mode .btn-eye-toggle {
    background: #1e1e1e;
    color: #d4af37;
    border-color: #d4af37;
}
/* Add to bottom of style.css */

/* Container Fix */
#scr-ratta {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #fdf8ef; /* Cream Background */
}

#ratta-list {
    flex: 1;
    overflow-y: auto !important;
    display: block !important; /* Forces list to take space */
}

/* Card Style */
.ratta-card-royal {
    background: #FFF8E7;
    border: 1px solid #d4af37; /* Gold Border */
    border-radius: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: block; /* Ensure it's not hidden */
    opacity: 1; /* Ensure visibility */
}

.rc-pattern-strip {
    height: 8px;
    background: repeating-linear-gradient(45deg, #800000, #800000 10px, #d4af37 10px, #d4af37 20px);
    width: 100%;
    border-radius: 15px 15px 0 0;
}

.rc-content { padding: 15px; }

/* Text Styles */
.rc-question {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.rc-answer-box {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    border-left: 4px solid #2e7d32;
    cursor: pointer;
}

/* Blurred Answer Mode */
.rc-answer-box.blurred {
    background: #eceff1;
    color: transparent;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    border-left: 4px solid #b0bec5;
}

/* Toolbar */
.ratta-toolbar {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 10;
}



.btn-eye-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #800000;
    background: white;
    color: #800000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-eye-toggle.active {
    background: #800000;
    color: white;
}
/* Add to style.css */

/* Number Badge */
.rc-number {
    background: var(--royal-maroon);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-family: 'Yatra One', serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Topic Badge */
.rc-topic {
    color: var(--royal-maroon);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background: #fff3e0;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--desert-gold);
}
/* Update the Header Layout */
.rc-header {
    display: flex;
    justify-content: space-between; /* Pushes content to edges */
    align-items: center;
    margin-bottom: 12px;
}

/* Style for the new Top-Right Report Button */
.rc-report-top {
    background: transparent;
    border: none;
    color: #bdbdbd; /* Subtle Grey */
    font-size: 1.1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Hover Effect (Turns Red) */
.rc-report-top:hover {
    color: #c62828;
    background: #ffebee;
}

/* Night Mode Support for the button */
body.night-mode .rc-report-top {
    color: #555;
}
body.night-mode .rc-report-top:hover {
    color: #ff8a80;
    background: #3e2723;
}
/* --- ROYAL MODAL ANIMATIONS --- */
/* --- ROYAL MODAL ANIMATIONS --- */
@keyframes slideUpFade {
    from { transform: translateY(20px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* --- MODAL STRUCTURE (FIXED) --- */
.royal-modal {
    /* Full Screen Fixed Position */
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    
    /* Centering */
    display: none; /* Hidden by default (Overrides flex) */
    justify-content: center;
    align-items: center;
    
    /* Appearance */
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 99999; /* Highest Priority */
    padding: 20px; /* Safe space for mobile edges */
}

/* Only show when active class is added */
.royal-modal.active {
    display: flex !important; /* Force show */
    animation: fadeIn 0.2s ease-out;
}

.jharokha-style {
    background: #fff;
    /* Royal Maroon Border */
    border: 3px solid var(--royal-maroon); 
    border-radius: 15px;
    padding: 0; 
    
    /* Size & Layout */
    width: 100%; 
    max-width: 320px; /* Standard phone width */
    max-height: 85vh; /* Never taller than screen */
    overflow-y: auto; /* Scroll if text is too long */
    
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    
    /* Animation */
    animation: slideUpFade 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Decorative Strip at Top */
.jharokha-style::before {
    content: '';
    display: block;
    width: 100%;
    height: 6px;
    background: repeating-linear-gradient(
        45deg,
        var(--royal-maroon),
        var(--royal-maroon) 10px,
        var(--desert-gold) 10px,
        var(--desert-gold) 20px
    );
}

/* --- HEADER --- */
.royal-header {
    background: #fff3e0;
    padding: 20px 15px 10px 15px;
    border-bottom: 2px dashed var(--desert-gold);
}

.royal-header h3 {
    color: var(--royal-maroon);
    font-family: 'Yatra One', cursive; 
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
}

/* --- BODY --- */
.royal-body {
    padding: 25px 20px;
}

.main-msg {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Mukta', sans-serif;
}

.sub-msg {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

/* --- FOOTER & BUTTONS --- */
.royal-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.btn-royal-outline {
    flex: 1;
    padding: 6px;
    border: 2px solid var(--royal-maroon);
    background: white;
    color: var(--royal-maroon);
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Mukta', sans-serif;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-royal-fill {
    flex: 1;
    padding: 6px;
    border: none;
    background: var(--royal-maroon);
    color: white; 
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Mukta', sans-serif;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(128, 0, 0, 0.3);
    animation: pulseGold 2s infinite; 
}

.btn-royal-outline:active { background: #fce4ec; transform: scale(0.98); }
.btn-royal-fill:active { transform: scale(0.98); background: #5d0000; }
