* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Roboto', sans-serif; }
:root { --primary-color: #2e7d32; --primary-dark: #1b5e20; --background-color: #f5f5f5; --surface-color: #ffffff; --text-primary: #212121; --text-secondary: #757575; --border-color: #e0e0e0; }
body { background-color: var(--background-color); color: var(--text-primary); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-header { background-color: var(--primary-color); color: white; display: flex; justify-content: space-between; align-items: center; padding: 16px; height: 56px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); z-index: 10; }
.header-left, .header-right { display: flex; align-items: center; gap: 16px; }
.header-left h1 { font-size: 20px; font-weight: 500; }
.hidden { display: none !important; }
.material-icons { cursor: pointer; }
.app-content { flex: 1; overflow-y: auto; position: relative; }
.screen { display: none; height: 100%; }
.screen.active { display: block; }
.form-container { padding: 16px; }
.form-group { margin-bottom: 16px; }
.form-group input[type="text"], .form-group input[type="number"] { width: 100%; padding: 12px; border: none; border-bottom: 2px solid var(--primary-color); background-color: transparent; font-size: 16px; outline: none; }
.form-group input::placeholder { color: var(--text-secondary); }
.section-title { color: var(--primary-color); font-size: 14px; font-weight: 500; margin-top: 24px; margin-bottom: 8px; text-transform: uppercase; }
.radio-group { display: flex; gap: 24px; margin-bottom: 16px; }
.radio-group label { display: flex; align-items: center; gap: 8px; font-size: 16px; cursor: pointer; }
.radio-group input[type="radio"] { accent-color: var(--primary-color); width: 20px; height: 20px; }
.form-actions { display: flex; justify-content: space-between; margin-top: 32px; }
.btn { padding: 10px 16px; border: none; border-radius: 4px; font-size: 14px; font-weight: 500; cursor: pointer; text-transform: uppercase; }
.btn-primary { background-color: var(--primary-color); color: white; }
.btn-secondary { background-color: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); }
.bottom-nav { display: flex; justify-content: space-around; align-items: center; background-color: var(--surface-color); border-top: 1px solid var(--border-color); height: 56px; padding: 0 8px; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-secondary); cursor: pointer; flex: 1; height: 100%; }
.nav-item.active { color: var(--primary-color); }
.nav-item span:last-child { font-size: 12px; margin-top: 4px; }
.list-container { padding: 16px; }
.card { background-color: var(--surface-color); border-radius: 4px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.fab { position: fixed; bottom: 72px; right: 16px; width: 56px; height: 56px; border-radius: 50%; background-color: var(--primary-color); color: white; border: none; box-shadow: 0 4px 8px rgba(0,0,0,0.2); display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 20; }
.fab .material-icons { font-size: 24px; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 100; }
.modal { background-color: var(--surface-color); border-radius: 4px; width: 90%; max-width: 400px; padding: 24px; box-shadow: 0 4px 24px rgba(0,0,0,0.2); }
.modal-title { font-size: 20px; font-weight: 500; margin-bottom: 16px; color: var(--text-primary); }
.modal-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 24px; }
.list-item { display: flex; align-items: center; padding: 16px; background-color: var(--surface-color); border-bottom: 1px solid var(--border-color); margin-bottom: 8px; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background-color: #e0e0e0; color: white; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 16px; margin-right: 16px; }
.item-content { flex: 1; }
.item-title { font-size: 16px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.item-subtitle { font-size: 12px; color: var(--text-secondary); }
.item-actions { display: flex; gap: 16px; }
.item-actions .material-icons { color: var(--text-secondary); font-size: 20px; }
.empty-state { text-align: center; color: var(--text-secondary); padding: 40px 16px; font-size: 16px; }
.scoring-header { background-color: var(--surface-color); padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.match-status-text { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.score-display { display: flex; justify-content: space-between; align-items: baseline; }
.main-score { font-size: 32px; font-weight: 500; }
.overs-display { font-size: 16px; color: var(--text-secondary); }
.crr-display { font-size: 14px; color: var(--text-secondary); }
.stats-table { width: 100%; border-collapse: collapse; background-color: var(--surface-color); margin-bottom: 8px; }
.stats-table th { text-align: right; font-size: 12px; color: var(--text-secondary); font-weight: normal; padding: 8px; border-bottom: 1px solid var(--border-color); }
.stats-table th:first-child, .stats-table td:first-child { text-align: left; }
.stats-table td { text-align: right; font-size: 14px; padding: 8px; border-bottom: 1px solid var(--border-color); }
.stats-table .active-player { font-weight: 500; color: var(--primary-color); }
.this-over-container { padding: 12px 16px; background-color: var(--surface-color); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; overflow-x: auto; }
.this-over-label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.ball-circle { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-color); display: flex; justify-content: center; align-items: center; font-size: 12px; color: var(--text-primary); flex-shrink: 0; }
.ball-circle.empty { color: transparent; }
.ball-circle.boundary { background-color: #1976d2; color: white; border-color: #1976d2; }
.ball-circle.wicket { background-color: #d32f2f; color: white; border-color: #d32f2f; }
.ball-circle.extra { background-color: #f57c00; color: white; border-color: #f57c00; }
.scoring-controls { padding: 16px; background-color: var(--surface-color); flex: 1; display: flex; flex-direction: column; }
.extra-toggles { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox-label input[type="checkbox"] { accent-color: var(--primary-color); width: 18px; height: 18px; }
.controls-row { display: flex; justify-content: space-between; margin-bottom: 16px; gap: 8px; }
.action-btn { flex: 1; padding: 12px 0; border: none; border-radius: 4px; background-color: var(--primary-color); color: white; font-size: 14px; font-weight: 500; text-transform: uppercase; cursor: pointer; }
.action-btn.secondary { background-color: transparent; color: var(--primary-color); border: 1px solid var(--primary-color); }
.action-btn.wicket { background-color: #d32f2f; }
.number-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: auto; }
.num-btn { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--border-color); background-color: transparent; font-size: 20px; color: var(--text-primary); cursor: pointer; display: flex; justify-content: center; align-items: center; }
.num-btn:active { background-color: #e0e0e0; }
.scoreboard-header { background-color: var(--primary-color); color: white; padding: 16px; font-size: 14px; }
.scoreboard-tabs { display: flex; background-color: var(--primary-dark); }
.sb-tab { flex: 1; text-align: center; padding: 12px; color: rgba(255,255,255,0.7); font-size: 14px; text-transform: uppercase; cursor: pointer; }
.sb-tab.active { color: white; border-bottom: 2px solid white; }
.scoreboard-content { background-color: var(--surface-color); margin-bottom: 8px; }
.inning-title { background-color: var(--primary-color); color: white; padding: 12px 16px; font-weight: 500; display: flex; justify-content: space-between; }
.sb-table { width: 100%; border-collapse: collapse; }
.sb-table th, .sb-table td { padding: 10px 16px; font-size: 14px; border-bottom: 1px solid var(--border-color); text-align: right; }
.sb-table th { color: var(--text-secondary); font-weight: normal; font-size: 12px; }
.sb-table th:first-child, .sb-table td:first-child { text-align: left; }
.player-name { color: var(--primary-color); font-weight: 500; }
.out-desc { font-size: 12px; color: var(--text-secondary); display: block; margin-top: 2px; }
.sb-row-highlight { background-color: #f5f5f5; font-weight: 500; }

/* Toggle Switch Styles */
.switch { position: relative; display: inline-block; width: 40px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; -webkit-transition: .4s; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: white; -webkit-transition: .4s; transition: .4s; }
input:checked + .slider { background-color: var(--primary-color); }
input:focus + .slider { box-shadow: 0 0 1px var(--primary-color); }
input:checked + .slider:before { -webkit-transform: translateX(16px); -ms-transform: translateX(16px); transform: translateX(16px); }
.slider.round { border-radius: 24px; }
.slider.round:before { border-radius: 50%; }
