/* Mobile-First Responsive Design */

/* Toggle sections */
.toggle-section { display: none; }
.active-section { display: block; }
.toggle-links {
    margin-bottom: 20px;
    font-size: 16px;
}
.toggle-links a {
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    display: inline-block;
}
.toggle-links a:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

/* Base styles */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
    background: #121212;
    font-size: 16px;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/squash.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.7);
    background-blend-mode: overlay;
    z-index: -1;
}

.container {
    position: relative;
    z-index: 1;
    color: #ffffff;
    padding: 15px;
}

/* Mobile-optimized tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

table {
    background: rgba(30, 30, 30, 0.9);
    color: #ffffff;
    border: 1px solid #666;
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

th {
    background: rgba(100, 50, 50, 0.7);
    font-weight: bold;
    color: #ffffff;
    text-align: left;
    padding: 12px 8px;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    background: rgba(40, 40, 40, 0.8);
    color: #ffffff;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

tr:nth-child(odd) td {
    background: rgba(50, 50, 50, 0.6);
}

tr:hover td {
    background: rgba(70, 70, 70, 0.8);
}

/* Forms and inputs */
.form-control, .btn {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 10px 15px;
}

.form-inline .form-control {
    margin-bottom: 10px;
    width: 100%;
}

.search-container {
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    white-space: nowrap;
    touch-action: manipulation;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

/* Info boxes */
.info-box {
    background: rgba(40, 40, 40, 0.9);
    border-left: 4px solid #007bff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.stats-summary {
    background: rgba(40, 40, 40, 0.8);
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Links */
a {
    color: #4dabf7;
}

a:hover {
    color: #74c0fc;
    text-decoration: none;
}

/* Navbar improvements */
.navbar {
    padding: 10px 15px;
}

.navbar-brand {
    font-size: 20px;
    font-weight: bold;
}

.navbar-nav .nav-link {
    padding: 10px 15px;
    font-size: 16px;
}

/* Modal improvements for mobile */
.modal-dialog {
    margin: 10px;
}

.modal-content {
    background: rgba(30, 30, 30, 0.98);
    color: #fff;
}

.modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* List groups */
.list-group-item {
    background: rgba(50, 50, 50, 0.8);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Tablet styles (768px and up) */
@media (min-width: 768px) {
    .container {
        padding: 20px;
    }

    table {
        font-size: 15px;
    }

    .form-inline .form-control {
        width: auto;
        display: inline-block;
        margin-right: 10px;
        margin-bottom: 0;
    }

    .modal-dialog {
        margin: 30px auto;
    }
}

/* Desktop styles (992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 1140px;
        padding: 30px;
    }

    table {
        font-size: 16px;
    }

    th, td {
        padding: 12px 10px;
    }
}

/* Extra large screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1320px;
    }
}

/* Touch-friendly spacing */
@media (hover: none) and (pointer: coarse) {
    /* This targets touch devices */
    .btn, a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 8px 5px;
    }
}

/* Landscape phone optimization */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        font-size: 14px;
    }

    .navbar {
        padding: 5px 10px;
    }

    .container {
        padding: 10px;
    }
}
