/* ====================================
   KRABPS GROUPS - GAMING PORTAL THEME
   Color Scheme: Black, Red, White
   ==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #000000;
    line-height: 1.6;
}

/* ====== HEADER & NAVIGATION ====== */
.header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    color: #ffffff;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(200, 0, 0, 0.3);
    border-bottom: 3px solid #dc143c;
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.brand {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.brand-logo {
    background: linear-gradient(135deg, #dc143c 0%, #ff6b6b 100%);
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 10px rgba(220, 20, 60, 0.4);
}

.brand h1 {
    font-size: 1.8rem;
    color: white;
    margin: 0;
}

.brand p {
    color: #dc143c;
    font-size: 0.9rem;
    margin: 0;
}

/* Navigation Bar */
.nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav a {
    padding: 0.7rem 1.2rem;
    background: rgba(220, 20, 60, 0.1);
    border: 2px solid #dc143c;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.nav a:hover,
.nav a.active {
    background: #dc143c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.5);
}

/* ====== CONTAINER & LAYOUT ====== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 2rem 0;
}

/* ====== CARDS & BOXES ====== */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #dc143c;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: -2rem -2rem 1.5rem -2rem;
    border-bottom: 3px solid #dc143c;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
}

.card-body {
    padding: 0;
}

/* ====== FORMS ====== */
.form-container {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #dc143c;
    margin: 2rem auto;
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    color: #000;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ====== BUTTONS ====== */
.btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #dc143c 0%, #ff6b6b 100%);
    color: white;
    border: 2px solid #dc143c;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
    background: linear-gradient(135deg, #b30000 0%, #ff3333 100%);
}

.btn-secondary {
    background: #333333;
    color: white;
    border: 2px solid #555;
}

.btn-secondary:hover {
    background: #1a1a1a;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-danger {
    background: #dc143c;
    color: white;
    border: 2px solid #dc143c;
}

.btn-danger:hover {
    background: #b30000;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.4);
}

.btn-success {
    background: #28a745;
    color: white;
    border: 2px solid #28a745;
}

.btn-success:hover {
    background: #218838;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ====== GAME GRID & NUMBER CHART ====== */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 0.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-radius: 12px;
    border: 3px solid #1a1a1a;
    margin: 1.5rem 0;
}

.number-btn {
    padding: 0.8rem 0.5rem;
    background: white;
    color: #000;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover:not(:disabled) {
    background: #dc143c;
    color: white;
    border-color: #dc143c;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
}

.number-btn.selected {
    background: #dc143c;
    color: white;
    border-color: #dc143c;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.5);
}

.number-btn.sold {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.2) 0%, rgba(0, 123, 255, 0.1) 100%);
    color: #333;
    border-color: #0078ff;
    opacity: 0.6;
    cursor: not-allowed;
}

/* ====== GAME ZONES & SECTIONS ====== */
.game-zone {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

.game-zone h3 {
    color: #dc143c;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zone-label {
    display: inline-block;
    background: #dc143c;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ====== SELECTED NUMBERS DISPLAY ====== */
.selected-numbers {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px dashed #dc143c;
    margin: 1.5rem 0;
}

.selected-numbers h4 {
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.number-pair {
    background: white;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 6px;
    border-left: 4px solid #dc143c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.number-pair div {
    font-weight: 700;
    font-size: 1.1rem;
    color: #000;
}

.number-pair .btn-danger {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* ====== MESSAGES & ALERTS ====== */
.message {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-weight: 600;
    border-left: 4px solid;
}

.message.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    border-color: #dc143c;
    color: #721c24;
}

.message.warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.message.info {
    background: #d1ecf1;
    border-color: #0c5460;
    color: #0c5460;
}

/* ====== INVOICE & RECORDS ====== */
.invoice {
    background: white;
    padding: 2rem;
    border: 2px solid #1a1a1a;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    page-break-inside: avoid;
}

.invoice h3 {
    color: #dc143c;
    border-bottom: 3px solid #1a1a1a;
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.invoice-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #ddd;
}

.invoice-details {
    line-height: 1.8;
}

.invoice-details p {
    margin: 0.3rem 0;
    color: #000;
}

.invoice-label {
    font-weight: 700;
    color: #1a1a1a;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.invoice-table th {
    background: #1a1a1a;
    color: white;
    padding: 0.8rem;
    text-align: left;
    border: 2px solid #dc143c;
}

.invoice-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #ddd;
}

.invoice-table tr:hover {
    background: #f9f9f9;
}

.invoice-total {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    text-align: right;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid #dc143c;
}

/* ====== TABLES ====== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    border: 2px solid #dc143c;
}

.table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #ddd;
    color: #000;
}

.table tr:hover {
    background: #f9f9f9;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
}

/* ====== TEXT UTILITIES ====== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-muted {
    color: #666;
}

.text-danger {
    color: #dc143c;
}

.text-success {
    color: #28a745;
}

/* ====== SPACING ====== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ====== FOOTER ====== */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 3px solid #dc143c;
}

footer p {
    color: white;
    margin: 0.5rem 0;
}

/* ====== ANIMATIONS ====== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-slide {
    animation: slideIn 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 1.5s infinite;
}

.animate-shake {
    animation: shake 0.4s ease-in-out;
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 768px) {
    .header {
        padding: 1rem 0;
    }

    .brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .brand h1 {
        font-size: 1.3rem;
    }

    .nav {
        gap: 0.3rem;
    }

    .nav a {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: 80px;
    }

    .card {
        padding: 1.5rem;
    }

    .card-header {
        margin: -1.5rem -1.5rem 1rem -1.5rem;
    }

    .form-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .number-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.4rem;
        padding: 1rem;
    }

    .number-btn {
        padding: 0.6rem 0.4rem;
        min-height: 45px;
        font-size: 0.85rem;
    }

    .invoice {
        padding: 1.5rem;
    }

    .invoice-header {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .table {
        font-size: 0.9rem;
    }

    .table th,
    .table td {
        padding: 0.6rem;
    }
}

@media (max-width: 480px) {
    .brand-logo {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .brand h1 {
        font-size: 1.1rem;
    }

    .nav {
        gap: 0.2rem;
    }

    .nav a {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-width: 70px;
    }

    .number-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.3rem;
        padding: 0.75rem;
    }

    .number-btn {
        padding: 0.5rem 0.3rem;
        min-height: 40px;
        font-size: 0.75rem;
    }

    .invoice {
        padding: 1rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.6rem;
        font-size: 16px;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-width: 100px;
    }
}

/* ====== PRINT STYLES ====== */
@media print {
    .header,
    .nav,
    .btn,
    footer {
        display: none !important;
    }

    .invoice {
        page-break-inside: avoid;
        box-shadow: none;
        border: 2px solid #000;
        margin: 0;
    }

    body {
        background: white;
        color: #000;
    }
}
