/* Shared site styles for Multiplication Master */
/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* Core layout */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #111;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    padding: 20px;
}

.container { max-width: 1200px; margin: 0 auto; }
.header { text-align: center; margin-bottom: 40px; }
.header h1 { font-size: 48px; color: white; text-shadow: 2px 2px 6px rgba(0,0,0,0.25); }
.header p { font-size: 18px; color: rgba(255,255,255,0.9); }

.footer { text-align:center; color: rgba(255,255,255,0.9); font-size: 16px; margin-top: 40px; }

/* Navigation menu */
.nav-menu { display:flex; gap:15px; justify-content:center; flex-wrap:wrap; margin-bottom: 24px; }
.nav-btn { padding: 10px 18px; font-weight:700; border-radius:12px; background:white; color:#333; text-decoration:none; box-shadow: 0 6px 18px rgba(0,0,0,0.14); border: none; }
.nav-btn:hover { transform: translateY(-2px); }
.nav-btn.active { background: #10b981; color: #fff; }

/* Simple card */
.card, .quiz-setup, .quiz-game, .quiz-results, .tips-card, .worksheets-container, .table-card { background:white; border-radius: 18px; padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }

/* Feature cards and stats (index) */
.features-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-bottom: 34px; }
.feature-card { background: white; border-radius: 18px; padding: 24px; box-shadow: 0 8px 30px rgba(0,0,0,0.15); display:flex; flex-direction:column; text-align:center; text-decoration:none; color: #333; }
.feature-icon { font-size: 56px; margin-bottom: 14px; }
.feature-title { font-size: 20px; font-weight:800; margin-bottom: 10px; }
.feature-desc { color: #666; font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.features-grid .feature-link { margin-top:auto; padding: 10px 18px; border-radius: 12px; text-decoration:none; background:#667eea; color:white; }

.stats { background:white; border-radius: 18px; padding: 24px; margin-bottom: 28px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
.stats-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-item { background: linear-gradient(135deg, #667eea, #764ba2); color:white; padding:22px; border-radius: 12px; text-align:center; }
.stat-number { font-size: 32px; font-weight:800; }
.stat-label { font-size: 14px; }

/* Buttons */
.btn { padding: 12px 22px; font-weight:700; border-radius: 12px; border: none; cursor: pointer; background: #10b981; color: white; box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.btn:hover:not(:disabled) { transform: translateY(-3px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-print { background: white; color: #3b82f6; border: 2px solid #e6eef9; }
.btn-download { background: #10b981; }
.btn-download-all { background: #8b5cf6; }
.start-quiz-btn { background:#06b6d4; color:white; border-radius:12px; padding: 14px 26px; }

/* Number grid */
.number-grid { display:grid; grid-template-columns: repeat(6, 1fr); gap: 12px; max-width: 800px; margin: 0 auto 24px; }
.number-btn { padding: 18px; font-size: 26px; font-weight:700; border-radius: 12px; background: white; color: #333; box-shadow:0 6px 18px rgba(0,0,0,0.12); border: none; cursor: pointer; }
.number-btn.active { transform: scale(1.08); color: white; }

/* Table and facts */
.table-title { font-size: 36px; text-align:center; font-weight:800; margin-bottom:18px; }
.facts-container { max-width: 540px; margin: 0 auto; }
.fact-row { display:flex; justify-content:center; gap: 12px; padding: 14px; margin: 8px 0; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.fact-problem { font-size: 24px; font-weight: 700; }
.fact-answer { font-size: 26px; font-weight: 800; }

/* Table selector checkbox style */
.table-selector { display:grid; grid-template-columns:repeat(6, 1fr); gap: 10px; justify-items: center; }
.table-checkbox { display:none; }
.table-label { padding: 12px 14px; border-radius: 10px; border: 3px solid #e5e7eb; background:white; font-weight:700; cursor:pointer; display:inline-block; }
.table-checkbox:checked + .table-label { background: #10b981; color: white; border-color:#10b981; }

/* MCQ Buttons */
.mcq-container { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.mcq-option { padding:12px 20px; font-size:20px; background:white; border:3px solid #e5e7eb; border-radius: 12px; cursor:pointer; }

.feedback { font-size:18px; text-align:center; margin-top:14px; }
.feedback.correct { color: #059669; font-weight:700; }
.feedback.incorrect { color: #ef4444; font-weight:700; }

/* Worksheets grid */
.worksheet-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.worksheet-card { border-radius: 12px; padding:18px; text-align:center; color: white; min-height: 120px; position: relative; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.worksheet-card-link { display:block; width:100%; color:inherit; text-decoration:none; }
.worksheet-card-download { position: absolute; right: 10px; bottom: 10px; border-radius: 8px; padding: 8px 10px; background: rgba(255,255,255,0.15); border: none; color: white; cursor:pointer; }
.worksheet-card-download:hover { transform: translateY(-2px); }

/* Quick tables section */
.quick-tables { background: white; border-radius: 18px; padding: 28px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); margin-bottom: 28px; }
.quick-tables h2 { text-align: center; margin-bottom: 20px; color: #333; }
.quick-table-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 10px; }
.quick-table { display: flex; align-items: center; justify-content: center; padding: 14px; border-radius: 10px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; text-decoration: none; font-weight: 700; font-size: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); transition: transform 0.2s, box-shadow 0.2s; }
.quick-table:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.15); }

.loading { display:none; position: fixed; left:50%; top:50%; transform: translate(-50%,-50%); background:white; padding: 28px 36px; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.2); z-index: 9999; }
.loading.show { display:block; }

/* Responsive */
@media (max-width: 768px) { .number-grid { grid-template-columns: repeat(4,1fr); } .table-selector { grid-template-columns: repeat(3,1fr); } .mcq-option { min-width: 100px; } .header h1{font-size:36px;} }
