/* LOTTERY95 - Main Stylesheet */
/* Modern Professional Design with Dark Mode Support */

@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,100..700;1,100..700&display=swap');

:root {
    --primary-color: #ffffff;
    --secondary-color: #1a0047;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    --back-active: rgba(51, 146, 158, 0.267);
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --secondary-color: #3a3a3a;
    --boder-title: #0059ff;
    --btn-color: #007bff;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --card-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

[data-theme="dark"] {
    --primary-color: #080825;
    --bg-primary: #000000;
    --bg-secondary: #292e38;
    --bg-tertiary: #374151f6;
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --border-color: #374151;
    --back-active: rgba(4, 67, 97, 0.795);
    --secondary-color: #00f7ff;
    --boder-title: #072152;
    --btn-color: #004b47;

    --bg-primary: #1F2937;
    --bg-secondary: #111827;
    --bg-tertiary: #052455;
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --border-color: #374151;    

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --card-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kantumruy Pro', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Card */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid var(--info-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

table thead {
    background: var(--boder-title);
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
}

.badge-success { background: #D1FAE5; color: #065F46; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-secondary { background: var(--bg-tertiary); color: var(--text-primary); }

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Tablet (768px) */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .grid {
        gap: 1rem;
    }
    
    .stat-card {
        margin: 0.5rem 0;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
}

/* Mobile (640px) */
@media (max-width: 640px) {
    .grid {
        gap: 0.75rem;
    }
    
    .stat-card {
        margin: 0.25rem 0;
        padding: 1rem;
    }
    
    .card {
        padding: 0.875rem;
        margin-bottom: 0.75rem;
    }
    .card-header {
        margin-bottom: 0;
        color: black;
    }
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    h4 { font-size: 1rem; }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .grid {
        gap: 0.5rem;
    }
    
    .card {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    h1 { font-size: 1.375rem; }
    h2 { font-size: 1.125rem; }
    h3 { font-size: 1rem; }
    h4 { font-size: 0.9375rem; }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Stat Card */
.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px;
    margin: 5px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    padding: 10px;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-muted { color: var(--text-secondary); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Lottery Types Page Styles */
.lottery-type-card {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    background: var(--bg-primary);
}

.lottery-type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.lottery-type-card .card-header {
    background: linear-gradient(135deg, var(--info-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 1.25rem;
}

.lottery-type-card .card-header h5 {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.lottery-type-card .card-body {
    padding: 1.5rem;
    background: var(--bg-primary);
}

.lottery-type-card .card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.lottery-type-card .card-text {
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.lottery-details {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-row .label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-row .value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    font-size: 0.95rem;
}

.lottery-action-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.lottery-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #059669 0%, var(--success-color) 100%);
}

.lottery-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lottery-status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.lottery-status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.next-draw-highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--info-color);
    margin-top: 0.5rem;
}

.time-slot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.time-slot-badge {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.page-header {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.page-header h1 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1.1rem;
}

/* Grid System Enhancements */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-lg-4, .col-md-6 {
    padding: 0 15px;
}

.col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Main Content Layout for Lottery Pages */
.main-content {
    min-height: calc(100vh - 100px);
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin: 1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow-x: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--info-color) 0%, var(--success-color) 50%, var(--warning-color) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.content-area {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.content-area::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-radius: 50%;
    transform: translate(30px, -30px);
    pointer-events: none;
}

/* Enhanced Page Header */
.page-header {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 2.5rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--border-color);
    border-bottom: 3px solid var(--info-color);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233B82F6' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.page-title {
    position: relative;
    z-index: 1;
}

.page-title h2 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 2.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title h2 i {
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--info-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.page-title p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1.125rem;
    font-weight: 500;
    margin-left: 4.5rem;
}

@media (max-width: 992px) {
    .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .main-content {
        margin: 0.5rem;
        padding: 1.5rem;
    }
    
    .page-header {
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
        padding: 2rem 1.5rem;
    }
    
    .page-title h2 {
        font-size: 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .page-title p {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    .col-lg-4, .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .lottery-type-card {
        margin-bottom: 1.5rem;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .detail-row .value {
        text-align: left;
    }
    
    .main-content {
        margin: 0.25rem;
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    
    .page-header {
        margin: -1rem -1rem 1rem -1rem;
        padding: 1.5rem 1rem;
    }
    
    .page-title h2 {
        font-size: 1.75rem;
    }
    
    .page-title h2 i {
        padding: 0.5rem;
    }
}
