* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cricket-green: #00A651;
    --cricket-dark: #1a472a;
    --cricket-light: #90EE90;
    --cricket-gold: #FFD700;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 50%, #1a472a 100%);
    color: white;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: rgba(30, 30, 30, 0.9);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 16px;
}

.btn-primary {
    background: var(--cricket-green);
    color: white;
}

.btn-primary:hover {
    background: #008a42;
    transform: scale(1.05);
}

.btn-secondary {
    background: #4a5568;
    color: white;
}

.btn-secondary:hover {
    background: #2d3748;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.input-field {
    width: 100%;
    padding: 12px;
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    margin-bottom: 16px;
}

.input-field:focus {
    outline: none;
    border-color: var(--cricket-green);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.2);
}

.score-button {
    background: var(--cricket-green);
    color: white;
    font-size: 24px;
    font-weight: bold;
    padding: 24px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
    min-height: 80px;
    margin: 8px;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.score-button:hover {
    background: #008a42;
    transform: scale(1.1);
}

.score-button:active {
    transform: scale(0.95);
}

.wicket-button {
    background: #e53e3e;
    color: white;
    font-size: 18px;
    font-weight: bold;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 8px;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.wicket-button:hover {
    background: #c53030;
    transform: scale(1.05);
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .score-button {
        min-width: 70px;
        min-height: 70px;
        font-size: 20px;
        padding: 12px 16px;
        margin: 4px;
    }
    
    .wicket-button {
        padding: 12px 16px;
        font-size: 16px;
        margin: 4px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    h3 {
        font-size: 1.125rem !important;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    table th, table td {
        padding: 8px 4px;
    }
    
    .input-field {
        padding: 10px;
        font-size: 14px;
    }
    
    .flex {
        flex-wrap: wrap;
    }
    
    .justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .score-button {
        min-width: 60px;
        min-height: 60px;
        font-size: 18px;
        padding: 10px 12px;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 12px;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    .container {
        padding: 8px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn, .score-button, .wicket-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .input-field {
        min-height: 44px;
    }
    
    select {
        min-height: 44px;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table th {
    background: rgba(0, 166, 81, 0.2);
    font-weight: bold;
}

.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(229, 62, 62, 0.2);
    border: 1px solid #e53e3e;
    color: #feb2b2;
}

.alert-success {
    background: rgba(0, 166, 81, 0.2);
    border: 1px solid var(--cricket-green);
    color: var(--cricket-light);
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 16px;
}

.mt-4 {
    margin-top: 16px;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-4 {
    gap: 16px;
}

