/* ============================================
   SHARED APP CSS - Ludo & Carrom Tournament
   ============================================ */

/* Reset */
*{margin:0;padding:0;box-sizing:border-box;}

/* Base */
body{font-family:'Poppins',sans-serif;background:#f4f6fb;display:flex;justify-content:center;padding:20px;height:100vh;overflow:hidden;}

/* Mobile Container */
.mc{width:390px;height:100vh;background:#fff;border-radius:30px;overflow-y:auto;overflow-x:hidden;box-shadow:0 15px 40px rgba(0,0,0,.08);position:relative;}
.mc::-webkit-scrollbar{width:0;display:none;}

/* Header */
.header{display:flex;justify-content:space-between;align-items:center;padding:18px 18px 14px;background:#fff;z-index:10;position:sticky;top:0;}
.h-btn{width:42px;height:42px;border-radius:12px;background:#f3f4f8;display:flex;justify-content:center;align-items:center;font-size:18px;color:#444;cursor:pointer;transition:.3s;text-decoration:none;}
.h-btn:hover{background:#2563eb;color:#fff;}
.header h4{font-size:18px;font-weight:600;color:#222;}

/* Back Bar */
.back-bar{display:flex;align-items:center;gap:12px;margin-bottom:20px;}
.back-bar a{width:40px;height:40px;border-radius:12px;background:#f3f4f8;display:flex;justify-content:center;align-items:center;font-size:16px;color:#444;text-decoration:none;transition:.3s;}
.back-bar a:hover{background:#2563eb;color:#fff;}
.back-bar h3{font-size:18px;font-weight:600;color:#222;}

/* Balance Card */
.bal-card{margin-bottom:24px;padding:18px;border-radius:22px;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;display:flex;justify-content:space-between;align-items:center;box-shadow:0 10px 30px rgba(37,99,235,.25);}
.bal-card span{font-size:13px;opacity:.9;}
.bal-card h2{margin-top:5px;font-size:28px;font-weight:700;}

/* Buttons */
.btn-blue{background:#fff;color:#2563eb;border:none;padding:12px 18px;border-radius:12px;font-weight:600;cursor:pointer;transition:.3s;text-decoration:none;display:inline-block;font-size:14px;font-family:'Poppins',sans-serif;}
.btn-blue:hover{transform:translateY(-2px);}
.btn{width:100%;padding:13px;border:none;border-radius:12px;font-size:15px;font-weight:600;cursor:pointer;font-family:'Poppins',sans-serif;transition:.3s;}
.btn-p{background:#2563eb;color:#fff;}.btn-p:hover{background:#1d4eddb;}
.btn-g{background:#16a34a;color:#fff;}.btn-g:hover{background:#15803d;}
.btn-o{background:#fff;color:#2563eb;border:2px solid #2563eb;}.btn-o:hover{background:#eff6ff;}

/* Quick Actions Grid */
.qa-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:28px;}
.qa-item{text-align:center;text-decoration:none;display:block;color:inherit;}
.qa-icon{width:54px;height:54px;margin:auto;border-radius:18px;display:flex;justify-content:center;align-items:center;font-size:20px;color:#fff;margin-bottom:10px;}
.qa-item span{font-size:12px;color:#444;font-weight:500;}
.qa-icon.green{background:#16a34a;}
.qa-icon.blue{background:#2563eb;}
.qa-icon.orange{background:#f59e0b;}
.qa-icon.purple{background:#9333ea;}

/* Section Title */
.sec-title{margin-bottom:16px;}
.sec-title h3{font-size:18px;color:#222;}

/* Game Grid */
.g-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.g-card{background:#f7f8fc;border-radius:20px;overflow:hidden;transition:.3s;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.05);text-decoration:none;display:block;color:inherit;}
.g-card:hover{transform:translateY(-5px);}
.g-card .gt{padding:15px;}
.g-card .gt h4{font-size:16px;margin-bottom:5px;}
.g-card .gt p{color:#2563eb;font-size:13px;font-weight:600;}
.g-card img{width:100%;display:block;height:110px;object-fit:cover;}

/* Tournament Card */
.tc{background:#fff;border-radius:16px;padding:14px;margin-bottom:12px;display:flex;align-items:center;gap:14px;box-shadow:0 2px 10px rgba(0,0,0,.04);transition:.3s;}
.tc:hover{box-shadow:0 4px 15px rgba(0,0,0,.08);}
.tc-icon{width:54px;height:54px;border-radius:14px;display:flex;justify-content:center;align-items:center;overflow:hidden;flex-shrink:0;}
.tc-icon img{width:100%;height:100%;object-fit:cover;}
.tc-info{flex:1;}
.tc-info h4{font-size:15px;font-weight:600;color:#1e293b;margin-bottom:4px;}
.tc-meta{display:flex;gap:10px;font-size:12px;color:#64748b;flex-wrap:wrap;}
.tc-badge{display:inline-block;padding:2px 10px;border-radius:12px;background:#f1f5f9;color:#475569;font-size:11px;font-weight:500;margin-top:5px;}
.tc-join{padding:8px 16px;background:#2563eb;color:#fff;border:none;border-radius:10px;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap;transition:.3s;}
.tc-join:hover{background:#1d4eddb;}

/* Filter Bar */
.filter-bar{display:flex;gap:8px;margin-bottom:18px;overflow-x:auto;padding-bottom:4px;}
.filter-bar a{padding:7px 16px;border-radius:20px;font-size:13px;font-weight:500;text-decoration:none;white-space:nowrap;transition:.3s;background:#f1f5f9;color:#475569;}
.filter-bar a.active{background:#2563eb;color:#fff;}

/* Menu Grid */
.menu-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;}
.menu-item{background:#f7f8fc;border-radius:16px;padding:18px 10px;text-align:center;text-decoration:none;color:#1e293b;display:flex;flex-direction:column;align-items:center;gap:8px;transition:.3s;box-shadow:0 2px 8px rgba(0,0,0,.03);}
.menu-item:hover{background:#eef2ff;transform:translateY(-2px);}
.menu-item i{font-size:22px;color:#2563eb;}
.menu-item span{font-size:12px;font-weight:500;}

/* Profile Card */
.p-card{text-align:center;padding:30px 20px;background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-radius:20px;margin-bottom:24px;}
.p-avatar{width:80px;height:80px;border-radius:50%;background:rgba(255,255,255,.2);margin:0 auto 12px;display:flex;justify-content:center;align-items:center;font-size:32px;font-weight:700;border:3px solid rgba(255,255,255,.3);overflow:hidden;}
.p-avatar img{width:80px;height:80px;border-radius:50%;object-fit:cover;border:3px solid rgba(255,255,255,.3);}
.p-card h3{font-size:20px;font-weight:600;}
.p-card .email{font-size:13px;opacity:.8;margin-top:4px;}

/* Info Bar */
.info-bar{display:flex;justify-content:space-around;background:#f7f8fc;border-radius:14px;padding:14px;margin-bottom:20px;}
.info-item{text-align:center;}
.info-item .val{font-size:18px;font-weight:700;color:#2563eb;}
.info-item .lbl{font-size:11px;color:#64748b;margin-top:2px;}

/* Alerts */
.alert{padding:12px 16px;border-radius:10px;font-size:13px;margin-bottom:16px;}
.alert-error{background:#fee2e2;color:#dc2626;}
.alert-success{background:#dcfce7;color:#16a34a;}

/* Forms */
.form-group{margin-bottom:16px;}
.form-group label{display:block;font-size:13px;font-weight:500;color:#475569;margin-bottom:5px;}
.form-group input,.form-group select,.form-group textarea{width:100%;padding:12px 14px;border:1px solid #e2e8f0;border-radius:10px;font-family:'Poppins',sans-serif;font-size:14px;transition:.3s;}
.form-group input:focus,.form-group select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(59,130,246,.1);}

/* Payment Methods */
.method-list{display:flex;flex-direction:column;gap:10px;margin-bottom:18px;}
.method-card{display:flex;align-items:center;justify-content:space-between;padding:14px;border:2px solid #e2e8f0;border-radius:12px;cursor:pointer;transition:.3s;}
.method-card.selected{border-color:#2563eb;background:#eff6ff;}
.mc-left{display:flex;align-items:center;gap:12px;}
.mc-logo{width:40px;height:40px;border-radius:10px;display:flex;justify-content:center;align-items:center;font-size:18px;font-weight:700;color:#fff;}
.mc-bkash{background:#e2136e;}
.mc-nagad{background:#f6921e;}
.mc-name{font-size:14px;font-weight:600;}
.mc-check{color:#2563eb;font-weight:700;opacity:0;}
.method-card.selected .mc-check{opacity:1;}

/* Amount Grid */
.amt-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:18px;}
.amt-chip{padding:10px;text-align:center;border:2px solid #e2e8f0;border-radius:10px;font-size:13px;font-weight:600;cursor:pointer;transition:.3s;color:#475569;}
.amt-chip.selected{border-color:#2563eb;background:#eff6ff;color:#2563eb;}

/* Bonus Box */
.bonus-box{text-align:center;padding:30px 20px;}
.bonus-icon{font-size:60px;margin-bottom:16px;}
.bonus-box h2{font-size:22px;color:#1e293b;margin-bottom:8px;}
.bonus-box p{color:#64748b;font-size:14px;margin-bottom:16px;}
.bonus-amount{font-size:40px;font-weight:700;color:#2563eb;margin-bottom:20px;}

/* Notifications */
.notif-item{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid #f1f5f9;}
.notif-dot{width:10px;height:10px;border-radius:50%;margin-top:5px;flex-shrink:0;}
.notif-title{font-size:14px;font-weight:600;color:#1e293b;}
.notif-msg{font-size:13px;color:#64748b;margin-top:2px;}
.notif-time{font-size:11px;color:#94a3b8;margin-top:4px;}

/* Leaderboard */
.lb-item{display:flex;align-items:center;gap:12px;padding:14px;background:#fff;border-radius:14px;margin-bottom:10px;box-shadow:0 2px 8px rgba(0,0,0,.03);}
.lb-rank{width:32px;height:32px;border-radius:10px;background:#f1f5f9;display:flex;justify-content:center;align-items:center;font-size:13px;font-weight:700;color:#475569;}
.lb-rank.gold{background:#fef3c7;color:#d97706;}
.lb-rank.silver{background:#e2e8f0;color:#475569;}
.lb-rank.bronze{background:#fed7aa;color:#c2410c;}
.lb-avatar{width:42px;height:42px;border-radius:50%;background:#2563eb;color:#fff;display:flex;justify-content:center;align-items:center;font-weight:600;font-size:15px;overflow:hidden;}
.lb-avatar img{width:42px;height:42px;border-radius:50%;object-fit:cover;}
.lb-info{flex:1;}
.lb-name{font-size:14px;font-weight:600;color:#1e293b;}
.lb-pts{font-size:12px;color:#64748b;}
.lb-score{font-size:15px;font-weight:700;color:#2563eb;}

/* Match Card */
.match-card{background:#fff;border-radius:14px;padding:16px;margin-bottom:12px;box-shadow:0 2px 8px rgba(0,0,0,.04);}
.match-card h4{font-size:15px;font-weight:600;color:#1e293b;}
.match-meta{display:flex;gap:12px;font-size:12px;color:#64748b;}
.match-status{padding:3px 10px;border-radius:12px;font-size:11px;font-weight:600;}
.ms-won{background:#dcfce7;color:#16a34a;}
.ms-pending{background:#fef3c7;color:#d97706;}

/* Referral Box */
.refer-box{background:linear-gradient(135deg,#8b5cf6,#7c3aed);color:#fff;border-radius:20px;padding:24px;margin-bottom:20px;}
.refer-box h3{font-size:18px;font-weight:600;margin-bottom:8px;}
.refer-box p{font-size:13px;opacity:.85;line-height:1.5;}
.ref-code{display:flex;gap:10px;margin-top:14px;}
.ref-code input{flex:1;padding:10px 14px;border:2px solid rgba(255,255,255,.3);border-radius:10px;background:rgba(255,255,255,.1);color:#fff;font-family:'Poppins',sans-serif;font-size:14px;font-weight:600;text-align:center;}
.ref-code button{padding:10px 18px;background:#fff;color:#7c3aed;border:none;border-radius:10px;font-weight:600;cursor:pointer;font-family:'Poppins',sans-serif;}
.ref-link{margin-top:14px;}
.ref-link input{width:100%;padding:10px 14px;border:2px solid rgba(255,255,255,.3);border-radius:10px;background:rgba(255,255,255,.1);color:#fff;font-family:'Poppins',sans-serif;font-size:12px;}

/* Bottom Navigation */
.bnav{position:sticky;bottom:0;left:0;right:0;height:74px;background:#fff;display:flex;justify-content:space-around;align-items:center;border-top:1px solid #eee;z-index:10;}
.bnav a{text-decoration:none;color:#777;display:flex;flex-direction:column;align-items:center;font-size:12px;transition:.3s;font-family:'Poppins',sans-serif;}
.bnav a i{font-size:20px;margin-bottom:5px;}
.bnav a.active{color:#2563eb;font-weight:600;}
.bnav a:hover{color:#2563eb;}

/* YouTube Banner */
.yt-banner{margin-bottom:24px;padding:18px;border-radius:22px;background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff;display:flex;justify-content:space-between;align-items:center;box-shadow:0 10px 30px rgba(239,68,68,.25);}
.yt-banner-left span{font-size:13px;opacity:.9;}
.yt-banner-left h2{margin-top:5px;font-size:22px;font-weight:700;}
.yt-banner-right{text-align:right;}
.yt-banner-right .views{font-size:22px;font-weight:700;}
.yt-banner-right .earned{font-size:12px;opacity:.85;margin-top:2px;}

/* YouTube Search */
.yt-search{display:flex;gap:8px;margin-bottom:16px;}
.yt-search input{flex:1;padding:12px 16px;border:2px solid #e2e8f0;border-radius:14px;font-size:14px;font-family:'Poppins',sans-serif;outline:none;transition:.3s;}
.yt-search input:focus{border-color:#ef4444;}
.yt-search button{padding:12px 18px;background:#ef4444;color:#fff;border:none;border-radius:14px;cursor:pointer;font-family:'Poppins',sans-serif;font-size:14px;transition:.3s;}
.yt-search button:hover{background:#dc2626;}

/* YouTube Tabs */
.yt-tabs{display:flex;gap:10px;margin-bottom:18px;overflow-x:auto;padding-bottom:4px;}
.yt-tabs::-webkit-scrollbar{display:none;}
.yt-tab{padding:9px 18px;border-radius:20px;font-size:13px;font-weight:500;text-decoration:none;white-space:nowrap;background:#f1f5f9;color:#475569;transition:.3s;}
.yt-tab.active{background:#ef4444;color:#fff;}
.yt-tab:hover{background:#fee2e2;color:#ef4444;}
.yt-tab.active:hover{background:#ef4444;color:#fff;}

/* YouTube Video Card */
.yt-video{background:#f7f8fc;border-radius:16px;overflow:hidden;margin-bottom:14px;box-shadow:0 4px 12px rgba(0,0,0,.04);cursor:pointer;transition:.3s;text-decoration:none;display:block;color:inherit;}
.yt-video:hover{transform:translateY(-4px);box-shadow:0 8px 20px rgba(0,0,0,.08);}
.yt-thumb{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;background:#000;}
.yt-thumb img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;}
.yt-thumb .duration{position:absolute;bottom:8px;right:8px;background:rgba(0,0,0,.85);color:#fff;font-size:11px;padding:3px 8px;border-radius:6px;font-weight:500;}
.yt-thumb .shorts-badge{position:absolute;top:8px;left:8px;background:#ef4444;color:#fff;font-size:10px;padding:3px 10px;border-radius:6px;font-weight:600;}
.yt-info{padding:12px 14px;}
.yt-title{font-size:14px;font-weight:600;color:#1e293b;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.yt-meta{font-size:12px;color:#64748b;margin-top:4px;}

/* YouTube Player */
.yt-player-wrap{background:#000;border-radius:16px;overflow:hidden;margin-bottom:14px;box-shadow:0 8px 24px rgba(0,0,0,.15);}
.yt-player-frame{position:relative;padding-bottom:56.25%;height:0;}
.yt-player-frame iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none;}
.yt-progress{height:4px;background:#e2e8f0;border-radius:2px;margin:10px 0;overflow:hidden;}
.yt-progress-bar{height:100%;background:linear-gradient(90deg,#ef4444,#f97316);width:0%;transition:width 1s linear;border-radius:2px;}
.yt-watch-info{display:flex;justify-content:space-between;align-items:center;padding:6px 0;font-size:12px;color:#64748b;}

/* YouTube Channel */
.yt-channel{display:flex;align-items:center;gap:12px;padding:14px;background:#f7f8fc;border-radius:14px;margin-bottom:14px;}
.yt-channel img{width:44px;height:44px;border-radius:50%;}
.yt-sub-btn{padding:10px 20px;background:#ef4444;color:#fff;border:none;border-radius:12px;font-size:13px;font-weight:600;cursor:pointer;font-family:'Poppins',sans-serif;transition:.3s;}
.yt-sub-btn:hover{background:#dc2626;}

/* YouTube View Badge */
.yt-view-badge{display:inline-flex;align-items:center;gap:4px;padding:6px 12px;background:#dcfce7;color:#16a34a;border-radius:10px;font-size:12px;font-weight:600;}

/* YouTube Earning Popup */
.yt-earning-popup{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;padding:28px;border-radius:20px;box-shadow:0 10px 40px rgba(0,0,0,.2);z-index:1000;text-align:center;display:none;}
.yt-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:999;display:none;}

/* YouTube Quick Actions */
.yt-quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:24px;}
.yt-action{text-align:center;text-decoration:none;display:block;color:inherit;padding:14px 8px;background:#f7f8fc;border-radius:16px;transition:.3s;box-shadow:0 2px 8px rgba(0,0,0,.03);}
.yt-action:hover{background:#fee2e2;transform:translateY(-2px);}
.yt-action i{font-size:22px;color:#ef4444;margin-bottom:6px;display:block;}
.yt-action span{font-size:12px;font-weight:500;color:#1e293b;}

/* Dashboard YouTube Banner */
.yt-dash-banner{display:flex;align-items:center;gap:14px;padding:16px;background:linear-gradient(135deg,#ef4444,#dc2626);border-radius:18px;text-decoration:none;color:#fff;box-shadow:0 8px 20px rgba(239,68,68,.25);margin-bottom:24px;}
.yt-dash-banner:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(239,68,68,.3);}
.yt-dash-icon{width:50px;height:50px;background:rgba(255,255,255,.2);border-radius:14px;display:flex;justify-content:center;align-items:center;}
.yt-dash-icon i{font-size:26px;}
.yt-dash-info{flex:1;}
.yt-dash-info h4{font-size:16px;font-weight:600;}
.yt-dash-info p{font-size:12px;opacity:.85;}
.yt-dash-stats{text-align:right;}
.yt-dash-stats .amount{font-size:18px;font-weight:700;}
.yt-dash-stats .views{font-size:11px;opacity:.8;}

/* Animations */
@keyframes fadeIn{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);}}
.mc,.p-card,.bal-card,.g-card,.tc,.menu-item{animation:fadeIn .4s ease;}

/* Responsive */
@media(max-width:420px){
    body{padding:0;}
    .mc{width:100%;border-radius:0;box-shadow:none;}
}