:root {
    --primary: #d53f8c;
    --primary-hover: #b83280;
    --secondary: #9f7aea;
    --dark: #1a202c;
    --light: #f7fafc;
    --text: #2d3748;
    --text-light: #718096;
    --bg: #ffffff;
    --bg-alt: #fff5f7;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(213, 63, 140, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius: 12px;
}

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

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background-color: var(--bg-alt);
    line-height: 1.6;
    background-image: radial-gradient(circle at 10% 20%, rgba(213, 63, 140, 0.05) 0%, transparent 20%), 
                      radial-gradient(circle at 90% 80%, rgba(159, 122, 234, 0.05) 0%, transparent 20%);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: var(--dark);
}

.text-center { text-align: center; }
.py-5 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

/* Utilities */
.text-muted { color: var(--text-light); }
.text-success { color: #38a169; }
.text-info { color: #3182ce; }
.text-danger { color: #e53e3e; }
.text-primary { color: var(--primary); }
.shadow-lg { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1); }
.rounded { border-radius: var(--radius); }

/* Header & Nav */
.main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--primary);
}

/* Bottom Navigation (App Style) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav ul {
    display: flex;
    justify-content: space-around;
    list-style: none;
    padding: 0;
    margin: 0;
}
.bottom-nav li {
    flex: 1;
}
.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    user-select: none;
}
.bottom-nav .nav-icon {
    font-size: 1.4rem;
    margin-bottom: 3px;
    filter: grayscale(100%);
    opacity: 0.6;
}
.bottom-nav .nav-item.active {
    color: var(--primary);
}
.bottom-nav .nav-item.active .nav-icon {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* App Side Drawer */
.side-drawer-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.side-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}
.side-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg);
    z-index: 1002;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.side-drawer.active {
    transform: translateX(280px);
}
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.drawer-header h2 {
    font-size: 1.2rem;
    margin: 0;
}
.drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}
.drawer-links {
    list-style: none;
    padding: 20px;
    margin: 0;
    overflow-y: auto;
}
.drawer-links li {
    margin-bottom: 15px;
}
.drawer-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
}
.drawer-links hr {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin: 20px 0;
}

/* Mobile Toggle (Hidden on Desktop) */
.mobile-toggle {
    display: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    box-shadow: 0 4px 15px rgba(213, 63, 140, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(213, 63, 140, 0.4);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white !important;
}
.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}
.btn-block {
    display: block;
    width: 100%;
}
.w-100 { width: 100%; }

/* Hero Section */
.hero {
    padding: 60px 20px;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="%23d53f8c" opacity="0.03"/></svg>') repeat;
}
.hero-title {
    font-size: 2.6rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards & Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.event-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.event-image-placeholder {
    height: 180px;
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-code {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 2px;
}

.event-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-title {
    font-size: 1.3rem;
    margin: 15px 0;
}

.event-meta {
    margin-bottom: 20px;
    flex: 1;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

.meta-label { color: var(--text-light); }
.meta-value { font-weight: 600; }
.meta-value.price { color: var(--primary); font-size: 1.1rem; }

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.badge-active { background: #c6f6d5; color: #22543d; }
.badge-draft { background: #e2e8f0; color: #4a5568; }
.badge-closed { background: #fed7d7; color: #742a2a; }
.badge-draw_completed, .badge-success { background: #c6f6d5; color: #22543d; }
.badge-info { background: #ebf8ff; color: #2b6cb0; }

/* Event Details */
.event-detail-container {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin: 40px auto;
}
.event-title-large {
    font-size: 2.5rem;
}
.event-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.info-card {
    padding: 20px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid rgba(213, 63, 140, 0.1);
}
.info-card.highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}
.info-card.highlight h4 { color: rgba(255,255,255,0.9); }
.info-card .value { font-size: 1.8rem; font-weight: 700; margin: 10px 0; }
.info-card .sub-value { font-size: 0.9rem; color: var(--text-light); }
.info-card.highlight .sub-value { color: rgba(255,255,255,0.8); }

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.prize-card {
    padding: 30px;
    background: white;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--primary);
}
.prize-position {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding-top: 10px;
    padding-right: 10px;
}
.remaining-prize-card {
    background: linear-gradient(135deg, #ebf4ff, #e6fffa);
    padding: 40px;
    border-radius: var(--radius);
    border: 2px dashed #90cdf4;
}

/* Form Styles */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(213, 63, 140, 0.2);
}
.form-control-lg {
    padding: 15px 20px;
    font-size: 1.25rem;
    letter-spacing: 1px;
}
.check-form { max-width: 400px; margin: 0 auto; }

/* Winners Page */
.winners-container {
    max-width: 800px;
    margin: 0 auto;
}
.bg-gradient {
    background: linear-gradient(135deg, var(--dark), var(--primary));
}
.winner-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #edf2f7;
}
.winner-item:last-child { border-bottom: none; }
.position-badge {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 20px;
    font-size: 1.2rem;
}
.winner-animation {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* Footer */
.main-footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.footer-brand h3 { color: white; }
.footer-brand p { color: var(--text-light); }
.footer-links ul { list-style: none; }
.footer-links a { color: var(--text-light); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive */
/* Responsive Mobile App Feel */
@media (max-width: 768px) {
    /* Hide classic web elements */
    .main-nav { display: none; }
    .main-footer { display: none; }
    
    /* Show App Navigation and Toggle */
    .bottom-nav { display: block; }
    .mobile-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--primary);
    }
    
    /* Body padding to prevent content hiding behind bottom nav */
    body { padding-bottom: 80px; }
    
    /* App-like Top Header */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
    
    /* Adjust Layouts for Edge-to-Edge feel */
    .container {
        padding: 0 15px;
    }
    .hero { 
        padding: 40px 15px; 
    }
    .hero-title { 
        font-size: 2.2rem; 
    }
    .event-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .event-card {
        border-radius: 12px;
        margin-bottom: 10px;
    }
    .event-detail-container { 
        padding: 15px; 
        border-radius: 12px;
        margin-top: 10px;
    }
    
    /* Touch Friendly Buttons */
    .btn {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Remove hover effects requiring double-tap on mobile */
    .event-card:hover { transform: none; }
    
    /* Utility adjustments */
    .py-5 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
    .mt-5 { margin-top: 1rem; }
    .mb-5 { margin-bottom: 1rem; }
}
