*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth;scroll-padding-top:95px;overscroll-behavior-y:none}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;background:#f1f5f9;color:#1e293b;display:flex;justify-content:center;padding:0;line-height:1.65;font-size:15px;-webkit-font-smoothing:antialiased;position:relative}

.container{width:565px;max-width:100%;background:#ffffff;min-height:100vh;box-shadow:0 0 24px rgba(0,0,0,0.06);display:flex;flex-direction:column;position:relative;z-index:1}

/* CONFETTI CANVAS */
#confettiCanvas{position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:99999}

/* HEADER - SOLID ROYAL BLUE */
.header{background:#1d4ed8;color:#fff;padding:8px 12px;position:sticky;top:0;z-index:100;box-shadow:0 2px 10px rgba(0,0,0,0.12)}
.brand-link{display:flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;color:#fff}
.site-logo{width:30px;height:30px;border-radius:50%;object-fit:cover;border:2px solid #fff;background:#1d4ed8}
.brand-title{font-size:17px;font-weight:800;color:#ffffff;letter-spacing:.2px}

/* NAVIGATION - REDUCED PADDING */
.nav{display:flex;justify-content:center;gap:4px;padding:5px 6px;background:#eff6ff;border-bottom:1px solid #bfdbfe;position:sticky;top:46px;z-index:99;overflow-x:auto}
.nav a{flex:1;text-align:center;padding:4px 6px;background:#fff;border:1px solid #bfdbfe;border-radius:6px;color:#1d4ed8;font-size:11.5px;font-weight:700;text-decoration:none;transition:all .15s ease;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 1px 2px rgba(0,0,0,0.03)}
.nav a:active, .nav a.active{background:#1d4ed8;color:#fff;border-color:#1d4ed8;box-shadow:0 2px 8px rgba(29,78,216,0.25)}

/* RESULT HERO BOX */
.result-box{margin:6px 8px;background:#f8fafc;border-radius:10px;padding:8px;border:1px solid #e2e8f0;position:relative}
.result-box h2{font-size:13px;text-align:center;color:#1d4ed8;margin-bottom:4px;font-weight:700;line-height:1.25}
.result-grid{display:flex;gap:6px}

.round{flex:1;background:#fff;border-radius:8px;padding:6px 6px;text-align:center;user-select:none;cursor:pointer;border:1px solid #e2e8f0;transition:all .15s ease}
.round.fr-box{border-color:#bfdbfe}
.round.sr-box{border-color:#bbf7d0}
.round:active{transform:scale(.98)}

.round-header{display:block;font-size:12.5px;color:#475569;font-weight:700;white-space:nowrap}
.round-number{display:flex;align-items:center;justify-content:center;min-height:30px;margin-top:2px}

.fr-num-active{color:#1d4ed8;font-size:26px;font-weight:900;line-height:1}
.sr-num-active{color:#16a34a;font-size:26px;font-weight:900;line-height:1}

/* COUNTDOWN TIMER BADGE */
.countdown-container{margin:4px 0 2px;padding:3px 6px;background:#fffbeb;border:1px solid #fde68a;border-radius:6px;text-align:center;display:none}
.countdown-text{font-size:11px;font-weight:700;color:#b45309;display:flex;align-items:center;justify-content:center;gap:4px}
.countdown-timer{font-size:12px;font-weight:800;color:#d97706;background:#fff;padding:1px 6px;border-radius:4px;border:1px solid #fcd34d}

/* LIVE BADGE - REDUCED PADDING */
.live-badge{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:2px 7px;background:#fef2f2;border:1px solid #fecaca;border-radius:12px;margin:0 auto 4px;display:table}
.live-dot-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center;width:9px;height:9px}
.live-dot{width:7px;height:7px;background:#ef4444;border-radius:50%}
.live-ring{position:absolute;width:100%;height:100%;border-radius:50%;border:2px solid #ef4444;animation:livePulseRing 1.8s cubic-bezier(0.215,0.61,0.355,1) infinite}
.live-text{font-size:10.5px;font-weight:800;color:#dc2626;letter-spacing:1px;text-transform:uppercase}

@keyframes livePulseRing{
  0%{transform:scale(0.8);opacity:0.9}
  80%,100%{transform:scale(2.2);opacity:0}
}

/* SPINNER */
.spinner{width:20px;height:20px;border:2px solid #cbd5e1;border-top-color:#1d4ed8;border-radius:50%;animation:spin 0.8s linear infinite;margin:0 auto;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}

/* REFRESH & NOTIFICATION BUTTONS */
.cta{text-align:center;margin:4px 0 1px;display:flex;flex-direction:column;align-items:center;gap:3px}
.cta-buttons{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}
.btn-sm{display:inline-flex;align-items:center;justify-content:center;gap:4px;background:#1d4ed8;color:#fff;padding:4px 10px;border-radius:5px;font-weight:700;font-size:11px;border:none;cursor:pointer;font-family:inherit;box-shadow:0 2px 4px rgba(29,78,216,0.18);transition:all .15s ease}
.btn-sm:active{background:#1e3a8a;transform:scale(.94)}
.btn-sm.spinning svg{animation:spin 0.8s linear infinite}
.notif-btn{background:#f59e0b;box-shadow:0 2px 4px rgba(245,158,11,0.25)}
.notif-btn:hover{background:#d97706}
.notif-btn:active{background:#b45309}
.hint{text-align:center;font-size:10px;color:#94a3b8;font-style:italic}

/* SHARE THIS ARTICLE SECTION */
.share-box{margin:18px 0 12px;padding:12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px}
.share-title{font-size:13px;font-weight:800;color:#1d4ed8;margin-bottom:8px}
.share-buttons{display:flex;flex-wrap:wrap;gap:6px}
.share-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:6px;font-size:11.5px;font-weight:700;color:#fff;border:none;cursor:pointer;transition:all .15s ease;font-family:inherit}
.share-btn:active{transform:scale(.94)}
.share-btn.whatsapp{background:#25D366}
.share-btn.facebook{background:#1877F2}
.share-btn.twitter{background:#000000}
.share-btn.telegram{background:#229ED9}
.share-btn.copylink{background:#475569}

/* ARTICLE CONTENT */
.article{padding:10px 14px 18px;flex:1}
.article h1{font-size:19px;color:#0f172a;margin:10px 0 8px;font-weight:900;line-height:1.35}
.article h2{font-size:16px;color:#1d4ed8;margin:16px 0 8px;font-weight:800;line-height:1.35;position:relative;padding-left:8px;border-left:3.5px solid #1d4ed8}
.article h3{font-size:14.5px;color:#0f172a;margin:12px 0 6px;font-weight:700}
.article p{font-size:14.5px;color:#334155;margin-bottom:10px;line-height:1.65}
.article ul,.article ol{padding-left:20px;margin-bottom:10px}
.article li{font-size:14.5px;color:#334155;margin-bottom:5px;line-height:1.6}

/* ARTICLE THUMBNAIL */
.article-thumbnail{width:100%;height:auto;border-radius:10px;margin:10px 0 14px;border:1px solid #e2e8f0;display:block}

/* TABLE OF CONTENTS */
.toc-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:12px;margin:12px 0}
.toc-title{font-size:12.5px;font-weight:800;color:#1d4ed8;margin-bottom:6px;text-transform:uppercase}
.toc-box ul{list-style:none;padding-left:0;margin-bottom:0}
.toc-box li{margin-bottom:4px}
.toc-box a{color:#1d4ed8;text-decoration:none;font-size:13px;font-weight:600}
.toc-box a:hover{text-decoration:underline}

/* BLOCKQUOTE / EXAMPLE BOX */
blockquote, .example-box{background:#eff6ff;border-left:4px solid #1d4ed8;border-radius:0 8px 8px 0;padding:10px 12px;margin:10px 0;font-size:14px;color:#1e3a8a;line-height:1.6}

/* TABLE STYLING */
.table-controls{display:flex;gap:6px;margin-bottom:8px;align-items:center}
.table-search{flex:1;padding:7px 10px;border:1px solid #cbd5e1;border-radius:8px;font-size:12.5px;outline:none;background:#fff}
.table-search:focus{border-color:#1d4ed8}
.month-select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:8px;font-size:12.5px;outline:none;background:#fff;color:#1e293b;font-weight:600;cursor:pointer}

.table-wrap{overflow-x:auto;overflow-y:auto;max-height:420px;border-radius:10px;border:1px solid #e2e8f0;margin-bottom:12px}
table{width:100%;border-collapse:collapse;font-size:13.5px;background:#fff}
thead{background:#f8fafc;color:#475569;position:sticky;top:0;z-index:1}
th{padding:8px 6px;text-align:center;font-weight:700;color:#475569;border-bottom:1px solid #e2e8f0;font-size:12px}
td{padding:8px 6px;text-align:center;border-bottom:1px solid #f1f5f9;color:#334155;vertical-align:middle}
tbody tr:nth-child(even){background:#fafbfc}

/* CIRCLE BADGES FOR F/R AND S/R */
.num-circle{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;font-weight:800;font-size:13px}
.fr-circle{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}
.sr-circle{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0}

.time-badge{display:block;font-size:9.5px;color:#94a3b8;margin-top:1px}
mark.search-highlight{background:#fef08a;color:#854d0e;padding:1px 3px;border-radius:3px;font-weight:800}

/* COMMON NUMBER SECTION */
.common-box{background:#f8fafc;border-radius:10px;padding:12px;border:1px solid #e2e8f0;margin-bottom:12px}
.common-box h3{font-size:12.5px;color:#1d4ed8;margin-bottom:10px;font-weight:800;text-align:center;text-transform:uppercase}

.math-formula-box{background:#fff;border:1px solid #bfdbfe;border-radius:10px;padding:10px;text-align:center;margin-bottom:10px}
.math-formula-title{font-size:11px;font-weight:800;color:#1d4ed8;margin-bottom:6px;text-transform:uppercase}
.math-formula-grid{display:flex;justify-content:center;gap:10px}
.math-circle{width:40px;height:40px;border-radius:50%;background:#1d4ed8;color:#fff;font-size:16px;font-weight:900;display:flex;align-items:center;justify-content:center;border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,0.12)}

.common-sub-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:10px}
.common-card{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:8px 6px;text-align:center}
.common-card-title{font-size:10.5px;font-weight:700;color:#64748b;text-transform:uppercase;margin-bottom:4px;display:block}
.common-card-digits{font-size:13.5px;font-weight:800;color:#1d4ed8;display:flex;justify-content:center;gap:4px;flex-wrap:wrap}
.common-card-digits span{background:#eff6ff;padding:2px 6px;border-radius:4px;border:1px solid #bfdbfe}

/* FAQ STYLING */
.faq-item{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:10px 12px;margin-bottom:8px}
.faq-question{font-size:13.5px;font-weight:800;color:#1d4ed8;margin-bottom:3px}
.faq-answer{font-size:13px;color:#334155;line-height:1.6}

/* AUTHOR SECTION */
.author-section{margin:12px 8px;padding:12px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;display:flex;align-items:center;gap:10px}
.author-img{width:48px;height:48px;border-radius:50%;object-fit:cover;border:2px solid #1d4ed8;flex-shrink:0;background:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;overflow:hidden}
.author-info .author-name{font-size:14px;font-weight:800;color:#1e3a8a;margin-bottom:1px}
.author-info .author-role{font-size:10px;color:#1d4ed8;font-weight:700;margin-bottom:2px;text-transform:uppercase}
.author-info .author-bio{font-size:11.5px;color:#1e40af;line-height:1.45}

/* FOOTER */
.footer{background:#1e3a8a;color:#cbd5e1;padding:16px 12px 12px;margin-top:auto}
.footer-links{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-bottom:12px}
.footer-links a{color:#cbd5e1;text-decoration:none;font-size:11.5px;padding:4px 0}
.footer-links a:hover{color:#60a5fa}
.footer-links a::before{content:'› ';color:#60a5fa;font-weight:700}
.footer-bottom{text-align:center;padding-top:10px;border-top:1px solid #334155;font-size:10.5px;color:#94a3b8}
.footer-bottom a{color:#60a5fa;text-decoration:none;font-weight:600}

/* WHATSAPP FLOAT WITH ANIMATIONS */
.whatsapp-float{position:fixed;bottom:16px;right:16px;width:50px;height:50px;background:#25D366;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 20px rgba(37,211,102,.5);z-index:999;text-decoration:none;transition:transform .2s;animation:whatsappBounce 1.5s ease-in-out infinite}
.whatsapp-float:active{transform:scale(.92)}
.whatsapp-float svg{width:28px;height:28px;fill:#fff;animation:whatsappWiggle 2s ease-in-out infinite}
.whatsapp-float::before{content:'';position:absolute;width:100%;height:100%;border-radius:50%;background:#25D366;opacity:.6;animation:ringPulse 2s ease-out infinite;z-index:-1}

.whatsapp-label{position:fixed;bottom:72px;right:12px;background:#25D366;color:#fff;padding:5px 10px;border-radius:8px;font-size:10.5px;font-weight:700;z-index:999;box-shadow:0 4px 12px rgba(0,0,0,.15);animation:labelPop 1.5s ease-in-out infinite;text-align:center}

@keyframes whatsappBounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes whatsappWiggle{0%,100%{transform:rotate(0)}25%{transform:rotate(-10deg)}75%{transform:rotate(10deg)}}
@keyframes labelPop{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}
@keyframes ringPulse{0%{transform:scale(1);opacity:.6}100%{transform:scale(1.6);opacity:0}}

/* CONTACT FORM STYLES */
.contact-form{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:14px;margin:12px 0 16px;display:flex;flex-direction:column;gap:10px}
.form-group{display:flex;flex-direction:column;gap:4px}
.form-group label{font-size:12px;font-weight:700;color:#1e293b}
.form-group input, .form-group textarea{padding:8px 10px;border:1px solid #cbd5e1;border-radius:6px;font-size:13px;outline:none;font-family:inherit;background:#fff}
.form-group input:focus, .form-group textarea:focus{border-color:#1d4ed8;box-shadow:0 0 0 2px rgba(29,78,216,0.12)}
.btn-submit{align-self:flex-start;background:#1d4ed8;color:#fff;padding:8px 16px;border-radius:6px;font-size:12.5px;font-weight:700;border:none;cursor:pointer;transition:all .15s ease;box-shadow:0 2px 4px rgba(29,78,216,0.2)}
.btn-submit:active{background:#1e3a8a;transform:scale(.96)}

@media(max-width:600px){
  body{font-size:14px}
  .container{width:100%}
  .header{padding:8px 10px}
  .brand-title{font-size:15.5px}
  .site-logo{width:26px;height:26px}
  .nav{top:44px;padding:4px 4px}
  .nav a{font-size:10.5px;padding:4px 3px}
  .result-box{margin:5px 5px;padding:6px}
  .fr-num-active,.sr-num-active{font-size:24px}
  .num-circle{width:28px;height:28px;font-size:12px}
  .math-circle{width:36px;height:36px;font-size:15px}
  .article p,.article li{font-size:14px}
  .article h1{font-size:17.5px}
  .article h2{font-size:15.5px}
}
