:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary: #059669;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f9fafb;
    min-height: 100vh;
    color: #1f2937;
    line-height: 1.6;
}

/* Bootstrap Overrides */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand h1 {
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link.active {
    font-weight: 600;
    color: var(--primary) !important;
}

/* Hero Slider */
.hero-slider {
    margin-bottom: 0;
}

.hero-slide-1 {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>') !important;
    background-size: cover, cover;
    background-position: center, center;
}

.hero-slide-2 {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid2" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid2)"/></svg>') !important;
    background-size: cover, cover;
    background-position: center, center;
}

.hero-slide-3 {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(124, 58, 237, 0.95)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid3" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid3)"/></svg>') !important;
    background-size: cover, cover;
    background-position: center, center;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    opacity: 0.8;
}

.carousel-control-prev {
    left: 2rem;
}

.carousel-control-next {
    right: 2rem;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-indicators {
    bottom: 2rem !important;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
}

.carousel-indicators .active {
    background: white;
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-wrapper i {
    font-size: 2rem;
}

.feature-icon-large i {
    opacity: 0.3;
}

/* Step Numbers */
.step-number {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Avatars */
.avatar {
    width: 48px;
    height: 48px;
    font-weight: bold;
}

/* Raffle Cards */
.raffle-card-featured {
    border: 2px solid var(--primary) !important;
}

.raffle-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* Candidates Flow */
.candidates-flow-container {
    max-height: 80px;
}

.candidates-flow-wrapper {
    overflow: hidden;
}

.flow-text {
    white-space: nowrap;
    animation: scrollHorizontal 20s linear infinite;
    font-size: 0.875rem;
    color: #6b7280;
}

@keyframes scrollHorizontal {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Countdown Timer */
#countdown-timer span {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    min-width: 80px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

#countdown-timer span strong {
    display: block;
    font-size: 1.75rem;
    color: var(--primary);
}

/* Table Styles */
.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.table tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.05);
}

.table-primary {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
}

/* Badge Overrides */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Card Enhancements */
.card {
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Button Enhancements */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* Footer */
footer {
    background: #1f2937 !important;
}

footer a {
    transition: color 0.2s ease;
}

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

footer .text-white-50:hover {
    color: white !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-slide-content {
        min-height: 500px !important;
        padding: 2rem 0 !important;
    }
    
    .display-2 {
        font-size: 2rem !important;
    }
    
    .display-3 {
        font-size: 2rem !important;
    }
    
    .display-4 {
        font-size: 1.75rem !important;
    }
    
    .display-5 {
        font-size: 1.5rem !important;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        left: 1rem;
        right: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 1rem !important;
    }
    
    #countdown-timer span {
        padding: 0.75rem 1rem;
        min-width: 60px;
    }
    
    #countdown-timer span strong {
        font-size: 1.5rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .hero-slide-content {
        min-height: 450px !important;
    }
    
    .display-2 {
        font-size: 1.75rem !important;
    }
    
    .display-3 {
        font-size: 1.75rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
    }
}

/* Utility Classes */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

.bg-success {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

.bg-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
}

.bg-primary-subtle {
    background-color: rgba(16, 185, 129, 0.1) !important;
}

/* Carousel Fade Animation */
.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transform: none;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    opacity: 0;
}

/* Lifeline Last Minute Screen */
.last-minute-warning {
    max-width: 560px;
    margin: 0 auto;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 1.25rem;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
}

.last-minute-warning .display-1 {
    font-size: 3.5rem;
}

/* Lifeline winners visibility */
#winners-section {
    display: block;
}

/* Winner reveal animation */
.winner-reveal {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prize-card {
    transition: all 0.3s ease;
}

.prize-card.revealed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border-color: var(--primary) !important;
}

.winner-name {
    color: var(--primary);
    font-weight: 700;
}

/* Countdown box styles */
.countdown-box {
    min-width: 70px;
    text-align: center;
}

.countdown-box .value {
    font-size: 2rem;
    font-weight: 700;
}

.countdown-box .label {
    font-size: 0.75rem;
    text-transform: uppercase;
}
