:root {
    --sl-yellow: #FFE11D;
    --sl-red: #E03237;
    --sl-green: #19A03A;
    --sl-blue: #67C6ED;
    --sl-dark-blue: #285896;
    --sl-purple: #8E44AD;
    --sl-header-bg: #FFE11D;
    --sl-dark: #333333;
    --sl-border: #E0E0E0;
    --sl-light: #F5F5F5;
}

html, body {
    overflow-x: hidden;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
}

body {
    color: #000 !important;
    background-color: #f8f9fa !important;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

.navbar {
    background-color: white !important;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid var(--sl-yellow);
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.lottery-logo {
    width: 49px;
    height: 49px;
    border-radius: 4px;
    margin-right: 8px;
    display: inline-block;
    overflow: hidden;
    padding: 0;
    flex-shrink: 0;
}

.navbar .nav-link {
    color: #333 !important;
    font-weight: 500;
}

.navbar .nav-link:hover {
    color: var(--sl-red) !important;
}

.lottery-header, .card-header-lottery {
    background-color: var(--sl-yellow) !important;
    color: var(--sl-dark) !important;
    border-bottom: 3px solid var(--sl-red);
    font-weight: bold;
    border-radius: 0 !important;
    padding: 0.75rem 1.25rem;
}

.lottery-header-dark {
    background-color: var(--sl-dark) !important;
    color: white !important;
    border-bottom: 3px solid var(--sl-red);
    font-weight: bold;
    border-radius: 0 !important;
    padding: 0.75rem 1.25rem;
}

.section-title {
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--sl-dark);
    position: relative;
    padding-bottom: 5px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background-color: var(--sl-yellow);
}

.card {
    margin-bottom: 1.5rem;
    border: 1px solid var(--sl-border);
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.card-header {
    background-color: #f8f8f8;
    border-bottom: 1px solid var(--sl-border);
    font-weight: 600;
}

.card-body {
    background-color: #fff !important;
    color: #000 !important;
}

.table-responsive {
    border-radius: 0.25rem;
    overflow-x: hidden;
}

.table {
    --bs-table-bg: transparent !important;
    --bs-table-color: #000 !important;
    --bs-table-striped-bg: #f9f9f9 !important;
    --bs-table-striped-color: #000 !important;
    --bs-table-active-bg: #f5f5f5 !important;
    --bs-table-active-color: #000 !important;
    --bs-table-hover-bg: #f5f5f5 !important;
    --bs-table-hover-color: #000 !important;
    color: #000 !important;
    border-color: #dee2e6 !important;
}

.table th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table th:nth-child(1),
.table td:nth-child(1) {
    width: 18%;
    min-width: 140px;
}

.table th:nth-child(2),
.table td:nth-child(2) {
    width: 10%;
    min-width: 80px;
}

.table th:nth-child(3),
.table td:nth-child(3) {
    width: 15%;
    min-width: 120px;
    white-space: nowrap;
}

.table th:nth-child(4),
.table td:nth-child(4) {
    width: 57%;
    min-width: 350px;
}

.table-lottery {
    background-color: #fff !important;
    color: #000 !important;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    margin-bottom: 0;
    width: 100%;
}

.table-lottery th,
.table-lottery td {
    padding: 4px 6px !important;
    vertical-align: middle !important;
    font-size: 0.85rem !important;
    border-top: 1px solid #dee2e6;
    white-space: nowrap;
}

.table-lottery thead th {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 2px solid var(--sl-red);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.table-lottery tr {
    height: 35px;
}

.table-lottery tr,
.table-lottery tbody tr {
    background-color: #fff !important;
    color: #000 !important;
}

.table-lottery tbody tr:nth-child(even) {
    background-color: #fff !important;
}

.table-lottery tbody tr:nth-child(odd) {
    background-color: #fff !important;
}

.table-lottery td,
.table-lottery th {
    color: #000 !important;
    font-weight: 500 !important;
    border-bottom-color: #eee !important;
}

.table-lottery th:nth-child(1), .table-lottery td:nth-child(1) {
    width: 15% !important;
}

.table-lottery th:nth-child(2), .table-lottery td:nth-child(2) {
    width: 15% !important;
}

.table-lottery th:nth-child(3), .table-lottery td:nth-child(3) {
    width: 25% !important;
}

.table-lottery th:nth-child(4), .table-lottery td:nth-child(4) {
    width: 45% !important;
}

.match-compact {
    font-size: 0.8rem;
    line-height: 1.1;
    white-space: nowrap;
    padding: 4px 6px !important;
}

.table-lottery tr:hover {
    background-color: #f1f1f1;
}

.divisions-table th {
    background-color: #f2f2f2;
    text-align: center;
    font-weight: bold;
}

.divisions-table .division-name {
    font-weight: bold;
}

.divisions-table .winners-count {
    color: var(--sl-red);
    font-weight: bold;
    text-align: center;
}

.divisions-table .prize-amount {
    color: var(--sl-green);
    font-weight: bold;
    text-align: right;
}

.footer {
    margin-top: 2rem;
    padding: 1rem 0;
    background-color: white;
    color: #333;
    border-top: 2px solid var(--sl-yellow);
}

.pagination .page-link {
    color: #333;
    background-color: #fff;
    border-color: #ddd;
}

.pagination .page-item.active .page-link {
    background-color: var(--sl-yellow);
    border-color: var(--sl-yellow);
    color: var(--sl-dark);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
}

.form-control, .form-select {
    background-color: #fff;
    border-color: #ced4da;
    color: #333;
}

.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--sl-yellow);
    box-shadow: 0 0 0 0.25rem rgba(255, 225, 29, 0.25);
}

.bg-lottery {
    background-color: var(--sl-dark);
    color: white;
}

.btn-lottery-primary {
    background-color: var(--sl-red);
    border-color: var(--sl-red);
    color: white;
}

.btn-lottery-primary:hover {
    background-color: #c02030;
    border-color: #c02030;
    color: white;
}

.btn-lottery-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.btn-lottery-danger {
    background-color: var(--sl-red);
    border-color: var(--sl-red);
    color: #fff;
}

.btn-sync, .btn-import {
    background-color: var(--sl-yellow);
    border-color: var(--sl-yellow);
    color: #333;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 4px;
    padding: 8px 16px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-sync:hover, .btn-import:hover {
    background-color: #f0d200;
    border-color: #f0d200;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #333;
}

.btn-sync i, .btn-import i {
    font-size: 1rem;
}

canvas {
    width: 100% !important;
    max-height: 300px;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

h1, .h1 {
    font-size: 1.4rem;
}

h2, .h2 {
    font-size: 1.2rem;
}

h3, .h3 {
    font-size: 1.1rem;
}

.ad-container {
    width: 100%;
    margin: 20px 0;
    min-height: 100px;
    background-color: #f8f9fa;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    color: #999;
    text-align: center;
}

.ad-placeholder i {
    font-size: 2rem;
    color: var(--sl-yellow);
}

.ad-header, .ad-footer {
    width: 100%;
    margin: 15px 0;
    min-height: 90px;
}

.ad-sidebar {
    min-height: 250px;
    margin: 15px 0;
}

.ad-ticket-steps {
    width: 100%;
    min-height: 250px;
    margin: 20px 0;
}

#ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease;
}

#ad-overlay.closing {
    opacity: 0;
}

#ad-content {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    position: relative;
}

#countdown-container {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
}

#close-ad-btn {
    margin-top: 15px;
}

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

.interstitial-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.95);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ad-close-btn {
    margin-top: 20px;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 20px;
    max-width: 100%;
}

.steps-container:before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    border: 2px solid #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.step-text {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.step.active .step-circle {
    background-color: var(--sl-green);
    border-color: var(--sl-green);
    color: white;
}

.step.active .step-text {
    color: var(--sl-green);
    font-weight: bold;
}

.step.completed .step-circle {
    background-color: var(--sl-green);
    border-color: var(--sl-green);
    color: white;
}

.step.completed .step-text {
    color: var(--sl-green);
}

.draw-details-page .container-fluid.px-2.px-sm-3,
body.draw-details-page .container-fluid.px-2.px-sm-3,
html body.draw-details-page .container-fluid.px-2.px-sm-3 {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

.draw-details-container {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}

.dropdown-toggle::after {
    pointer-events: none;
}

.dropdown-toggle {
    cursor: pointer !important;
}

.dropdown-menu {
    position: absolute !important;
    z-index: 1050 !important;
    background-color: white;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: .25rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.175);
}

#userDropdown {
    position: relative;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
}

.navbar-nav .dropdown {
    position: relative;
}

.navbar-nav .dropdown-toggle {
    padding-right: 1.5rem !important;
}
