/* ============================================
   SPINNER WIN - CUSTOM STYLES
   ============================================ */

:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --success-color: #00b894;
    --danger-color: #d63031;
    --warning-color: #fdcb6e;
    --info-color: #74b9ff;
    --dark-color: #2d3436;
    --light-color: #dfe6e9;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
}

/* Bengali Font Support */
html[lang="bn"] body,
html[lang="bn"] {
    font-family: 'Noto Sans Bengali', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Apply Bengali font to all text elements when Bengali is selected */
html[lang="bn"] *:not(i):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.svg):not(canvas):not(path):not(circle) {
    font-family: 'Noto Sans Bengali', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Ensure form elements also use Bengali font */
html[lang="bn"] input,
html[lang="bn"] textarea,
html[lang="bn"] select,
html[lang="bn"] button {
    font-family: 'Noto Sans Bengali', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Footer specific - ensure Bengali font and prevent layout breakage */
html[lang="bn"] .footer,
html[lang="bn"] .footer *:not(i):not(.fa):not(.fas):not(.far):not(.fab):not(.fal) {
    font-family: 'Noto Sans Bengali', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Ensure footer maintains layout with Bengali text */
html[lang="bn"] .footer .row,
body.lang-bn .footer .row {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

html[lang="bn"] .footer a,
html[lang="bn"] .footer p,
html[lang="bn"] .footer h5,
html[lang="bn"] .footer h6,
html[lang="bn"] .footer li,
body.lang-bn .footer a,
body.lang-bn .footer p,
body.lang-bn .footer h5,
body.lang-bn .footer h6,
body.lang-bn .footer li {
    word-break: break-word;
    white-space: normal;
}

/* Additional class-based font application for Bengali */
body.lang-bn,
body.lang-bn *:not(i):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.svg):not(canvas):not(path):not(circle) {
    font-family: 'Noto Sans Bengali', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Navbar Styles */
.navbar {
    box-shadow: var(--shadow-md);
    background: var(--white) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

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

.card-header {
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    padding: 15px 20px;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--gradient-success);
    border: none;
}

/* Stats Cards */
.stats-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stats-card .stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.stats-card .icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stats-card .number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.stats-card .label {
    font-size: 1rem;
    color: var(--dark-color);
    opacity: 0.8;
}

/* Spinning Wheel Container */
.wheel-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 40px; /* Extra space for pointer on top */
}

.wheel-canvas {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

.wheel-pointer {
    position: absolute;
    top: -9px; /* Half of height (18px) - so half is outside, half is inside */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 18px solid #E74C3C; /* Default red - will be updated dynamically */
    z-index: 20;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: border-top-color 0.3s ease;
}

/* Live Badge */
.live-badge {
    display: inline-block;
    padding: 5px 15px;
    background: var(--danger-color);
    color: var(--white);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
}

/* Footer responsive layout - ensure proper wrapping with Bengali text */
.footer .row {
    display: flex;
    flex-wrap: wrap;
}

.footer .col-md-4,
.footer .col-md-2 {
    min-width: 0;
    flex: 0 0 auto;
}

/* Ensure footer columns maintain structure */
@media (min-width: 768px) {
    .footer .col-md-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }
    .footer .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Bengali text specific fixes for footer */
html[lang="bn"] .footer .col-md-4,
html[lang="bn"] .footer .col-md-2,
body.lang-bn .footer .col-md-4,
body.lang-bn .footer .col-md-2 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.footer a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--white);
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid var(--light-color);
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

/* Winner Cards */
.winner-card {
    background: var(--gradient-success);
    color: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    animation: slideInUp 0.5s ease;
}

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

.winner-card .winner-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 10px 0;
}

.winner-card .winner-prize {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* How It Works Section */
.how-it-works {
    padding: 60px 0;
    background: var(--light-color);
}

.step-card {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    height: 100%;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

/* Language Switcher */
.language-switcher .dropdown-toggle {
    border: 2px solid var(--light-color);
    border-radius: 8px;
    padding: 8px 15px;
    font-weight: 500;
}

.language-switcher .dropdown-toggle:hover {
    border-color: var(--primary-color);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 10px 0;
}

.mobile-bottom-nav .nav-item {
    text-align: center;
}

.mobile-bottom-nav .nav-link {
    color: var(--dark-color);
    font-size: 0.8rem;
    padding: 5px;
}

.mobile-bottom-nav .nav-link.active {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .stats-card .number {
        font-size: 2rem;
    }
    
    .mobile-bottom-nav {
        display: block;
    }
    
    .wheel-container {
        max-width: 100%;
        padding: 10px;
        padding-top: 35px; /* Extra space for pointer on mobile */
    }
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.rounded-custom {
    border-radius: 12px;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Confetti Effect */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    position: absolute;
    animation: confetti-fall 3s linear infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

