/* GLOBAL RESET */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
}

/* MAIN CONTAINER */
.main-container {
    max-width: 480px; /* Optimized for mobile screens */
    margin: 0 auto;
    padding: 10px;
}

/* HEADER STYLE */
.main-header {
    background-color: #85C1E9;
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #2c3e50;
}

.main-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #2c3e50;
    text-transform: uppercase;
}

/* LIVE RESULT TABLE */
.results-section {
    text-align: center;
    margin-bottom: 20px;
}

.date-display {
    font-weight: bold;
    padding: 10px;
    font-size: 16px;
    color: #2c3e50;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.result-table th {
    background: #34495e;
    color: white;
    padding: 12px;
    font-size: 16px;
    letter-spacing: 1px;
}

.round-names {
    background: #4ed9c1;
    font-weight: bold;
    font-size: 12px;
    color: #2c3e50;
}

.round-names td {
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.round-numbers td {
    font-size: 38px;
    font-weight: 900;
    padding: 20px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #2c3e50;
}

/* 3x3 GRID SYSTEM */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 4px; /* Tighter spacing for small icons */
    margin-top: 15px;
}

.card {
    aspect-ratio: 1 / 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.1s ease;
}

.card:active {
    transform: scale(0.95);
}

/* --- EXTRA SMALL ICON SIZE --- */
.card .icon {
    font-size: 12px; 
    margin-bottom: 2px;
}

/* --- EXTRA SMALL CARD TEXT --- */
.card p {
    margin: 0;
    font-size: 7px; 
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    line-height: 1;
    padding: 0 1px;
}

/* CARD COLORS */
.card-orange { background-color: #ff7f50; }
.card-dark-teal { background-color: #006666; }
.card-brown { background-color: #5d4037; }
.card-teal { background-color: #008080; }
.card-light-teal { background-color: #31b1b9; }
.card-pink { background-color: #e91e63; }

/* SPECIAL CARDS (White/Bordered) */
.card-white {
    background-color: white;
    border: 1px solid #ddd;
}

.card-white .deal-text {
    font-weight: 900;
    font-size: 12px; /* Smaller to match */
    letter-spacing: 1px;
    color: #333;
}

.card-white-border {
    background-color: white;
    border: 1px solid #ccc;
}

.card-white-border p {
    color: #a52a2a !important;
}

/* FOOTER STRIP */
.footer-strip {
    background-color: #e0e0e0;
    padding: 20px;
    margin-top: 30px;
    text-align: center;
    border-radius: 8px;
}

.footer-strip a {
    color: #0000EE;
    text-decoration: underline;
    font-weight: bold;
    font-size: 13px;
    display: block;
    margin-bottom: 12px;
}

.footer-links {
    font-size: 12px;
    color: #666;
}

.footer-links a {
    display: inline;
    color: blue;
    text-decoration: none;
    margin: 0 5px;
}

/* PREVIOUS RESULTS PAGE STYLING */
.history-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    background: white;
}

.history-table th, .history-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.badge-confirmed {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    border: 1px solid #2e7d32;
}
