/* ===== Mobile First CSS - KBC Lottery ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* Base styles (mobile first) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.5;
    font-size: 16px;
}

/* Logo Container - Mobile Optimized */
.logo-container {
    text-align: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 15px;
}

.logo {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.2));
}

/* Main Container */
.main-container {
    padding: 10px 12px 20px;
    max-width: 100%;
    margin: 0 auto;
}

/* Cards - Touch Friendly */
.glass-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 20px 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    margin-bottom: 15px;
}

/* Headings */
h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 15px;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.5rem;
    color: #667eea;
}

h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* Forms - Touch Optimized */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    display: block;
    font-size: 0.95rem;
}

.form-control, .form-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Buttons - Large Touch Targets */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin: 5px 0;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 576px) {
    .btn {
        width: auto;
        min-width: 200px;
        margin: 5px 8px;
    }
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.btn:active {
    transform: scale(0.98);
}

/* Landing Page Buttons - Extra Large */
.btn-landing {
    padding: 18px 30px;
    font-size: 1.3rem;
    margin: 10px auto;
    display: block;
    width: 90%;
    max-width: 300px;
}

/* Progress Bar - Mobile Optimized */
.progress-step {
    display: flex;
    justify-content: space-between;
    margin: 30px 0 20px;
    position: relative;
    flex-wrap: wrap;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 15%;
    width: 70%;
    height: 4px;
    background: #e9ecef;
    border-radius: 4px;
    z-index: 0;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    min-width: 80px;
}

.step .bullet {
    width: 45px;
    height: 45px;
    line-height: 45px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 8px;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.step.completed .bullet {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.step.active .bullet {
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
    transform: scale(1.1);
}

.step .label {
    font-weight: 600;
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 0.95rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Tables - Horizontal Scroll on Mobile */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0;
    border-radius: 12px;
}

.table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 500px; /* Forces scroll on mobile */
}

.table th {
    background: #343a40;
    color: white;
    padding: 12px 10px;
    font-weight: 600;
}

.table td {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
}

/* Images */
.img-thumbnail {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Admin Navbar - Mobile First */
.admin-navbar {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 15px;
}

.navbar-brand img {
    height: 35px;
    width: auto;
}

.navbar-nav {
    margin-top: 10px;
}

.nav-link {
    color: white;
    padding: 10px 15px;
    display: block;
    font-weight: 500;
}

/* Pagination - Mobile Friendly */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.page-link {
    padding: 8px 14px;
    background: white;
    border-radius: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Feature Boxes */
.feature-box {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    padding: 20px 15px;
    margin-top: 25px;
}

.feature-box h5 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-box p {
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

/* Grid System - Mobile First */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
}

.col-12, .col-md-6, .col-md-4, .col-md-2 {
    padding: 0 8px;
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-2 { width: 16.666%; }
    .col-md-4 { width: 33.333%; }
    .col-md-6 { width: 50%; }
}

/* Spacing */
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 30px; }
.text-center { text-align: center; }

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Touch-friendly File Inputs */
input[type="file"] {
    padding: 10px;
    background: #f8f9fa;
    border: 2px dashed #ced4da;
}

/* Responsive Breakpoints */
@media (min-width: 576px) {
    .logo { max-width: 220px; }
    .main-container { padding: 15px 20px; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .step .bullet { width: 55px; height: 55px; line-height: 55px; }
    .step .label { font-size: 0.85rem; }
}

@media (min-width: 768px) {
    .logo { max-width: 250px; }
    .main-container { max-width: 1200px; margin: 0 auto; }
    .btn-landing { display: inline-block; width: auto; }
    .step .bullet { width: 65px; height: 65px; line-height: 65px; }
    .step .label { font-size: 0.9rem; }
}