/* Mobile Responsiveness Adjustments */
body {
    transition: background-color 0.3s, color 0.3s;
    padding-top: 70px;
    padding-bottom: 70px;
    background-color: #fc7;
    color: #333;
}

body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

.mobile-main {
    margin-bottom: 70px;
}

.mobile-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to right, #2c3e50, #3498db);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 1000;
    padding: 10px 0;
}

.mobile-footer-nav.dark-theme {
    background: linear-gradient(to right, #1e1e1e, #1e1e1e);
}

.dark-theme .mobile-footer-nav {
    background: linear-gradient(to right, #1e1e1e, #1e1e1e);
}

.mobile-footer-nav .row {
    display: flex;
    justify-content: space-around;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-nav-link i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

.mobile-nav-link span {
    font-size: 0.7rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: #ffffff;
}

.mobile-nav-link.active i,
.mobile-nav-link:hover i {
    transform: scale(1.2);
}

.mobile-nav-link.active span,
.mobile-nav-link:hover span {
    opacity: 1;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.mobile-nav-link.active::after,
.mobile-nav-link:hover::after {
    width: 50%;
    left: 25%;
}

.dark-theme .card {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}

.dark-theme .navbar {
    background-color: #1e1e1e !important;
}

.dark-theme #theme-toggle {
    color: #f1c40f;
}

.ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

.ball.selected {
    background-color: #2ecc71;
}

.dark-theme .ball {
    background-color: #2980b9;
    color: #f0f0f0;
}

.dark-theme .ball.selected {
    background-color: #27ae60;
}

.selected-numbers {
    color: #666;
    font-style: italic;
}

.dark-theme .selected-numbers {
    color: #aaa;
}

.ball-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5px;
}

.ball-amount {
    width: 70px;
    margin-top: 5px;
    padding: 5px;
    font-size: 0.8rem;
    text-align: center;
}

.ball-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.dark-theme .ball-amount {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

/* Patti Number Dropdown Styling */
.select2-container--default .select2-selection--multiple {
    background-color: #f8f9fa;
    border: 2px solid #3498db;
    border-radius: 10px;
    min-height: 50px;
    padding: 5px;
    transition: all 0.3s ease;
}

.select2-container--default .select2-selection--multiple:focus,
.select2-container--default .select2-selection--multiple:hover {
    border-color: #2980b9;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 5px 10px;
    margin: 3px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    margin-left: 5px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    opacity: 1;
}

.select2-container--default .select2-selection--multiple .select2-search--inline {
    margin-left: 10px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border: 2px solid #3498db;
}

.select2-dropdown {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.select2-results__option {
    padding: 10px;
    transition: all 0.3s ease;
}

.select2-results__option--highlighted {
    background-color: #3498db;
    color: white;
}

/* Dark Theme Adaptations */
.dark-theme .select2-container--default .select2-selection--multiple {
    background-color: #333;
    border-color: #2980b9;
    color: #e0e0e0;
}

.dark-theme .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #2980b9;
}

.dark-theme .select2-dropdown {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

.dark-theme .select2-search--dropdown .select2-search__field {
    background-color: #333;
    border-color: #2980b9;
    color: #e0e0e0;
}

.dark-theme .select2-results__option {
    color: #e0e0e0;
}

.dark-theme .select2-results__option--highlighted {
    background-color: #2980b9;
}

.patti-ball {
    font-size: 0.8rem;
    width: 40px;
    height: 40px;
    margin: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dark-theme .patti-ball {
    background-color: #2980b9;
    color: #f0f0f0;
}

.jodi-ball {
    font-size: 0.8rem;
    width: 40px;
    height: 40px;
    margin: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dark-theme .jodi-ball {
    background-color: #2980b9;
    color: #f0f0f0;
}

.offcanvas {
    background-color: #2c3e50;
    color: #ecf0f1;
}

.offcanvas-header {
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.offcanvas-header .btn-close {
    background-color: rgba(255,255,255,0.2);
    opacity: 1;
    border-radius: 50%;
}

.offcanvas-body .nav-link {
    color: #ecf0f1;
    font-weight: 500;
    padding: 12px 15px;
    margin: 5px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.offcanvas-body .nav-link:hover,
.offcanvas-body .nav-link.active {
    background-color: rgba(52, 152, 219, 0.3);
    color: #3498db;
    transform: translateX(10px);
}

.offcanvas-body .nav-link::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #3498db;
    border-radius: 50%;
    margin-right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.offcanvas-body .nav-link.active::before {
    opacity: 1;
}

.dark-theme .offcanvas {
    background-color: #1e1e1e;
}

.dark-theme .offcanvas-body .nav-link {
    color: #e0e0e0;
}

.dark-theme .offcanvas-body .nav-link:hover,
.dark-theme .offcanvas-body .nav-link.active {
    background-color: rgba(52, 152, 219, 0.2);
}

/* Game Select Styling */
.game-select-wrapper {
    position: relative;
}

.game-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 50px;
    background-color: #f8f9fa;
    border: 2px solid #3498db;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.game-select:focus {
    border-color: #2980b9;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.game-select-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #3498db;
    pointer-events: none;
    transition: color 0.3s ease;
}

.dark-theme .game-select {
    background-color: #333;
    border-color: #2980b9;
    color: #e0e0e0;
}

.dark-theme .game-select-icon {
    color: #2980b9;
}

.game-select option {
    background-color: #f8f9fa;
    color: #2c3e50;
}

.dark-theme .game-select option {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

/* Free Games Styling */
#content-section .accordion-button {
    background-color: #f8f9fa;
    color: #2c3e50;
    transition: all 0.3s ease;
}

#content-section .accordion-button:not(.collapsed) {
    background-color: #3498db;
    color: white;
}

.dark-theme #content-section .accordion-button {
    background-color: #333;
    color: #e0e0e0;
}

.dark-theme #content-section .accordion-button:not(.collapsed) {
    background-color: #2980b9;
    color: white;
}

#content-section .alert {
    font-size: 0.9rem;
}

#free-games .card {
    transition: transform 0.3s ease;
}

#free-games .card:hover {
    transform: scale(1.05);
}

.dark-theme #free-games .card {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

/* Refresh Button Styling */
#refresh-results {
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

#refresh-results i {
    margin-right: 10px;
    transition: transform 0.5s ease;
}

#refresh-results.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.dark-theme #refresh-results {
    background-color: #2980b9;
    border-color: #2980b9;
}

.dark-theme #refresh-results:hover {
    background-color: #3498db;
}

/* Audio Section Styling */
.audio-section {
    margin-top: 70px; 
    padding: 10px;
    background-color: rgba(0,0,0,0.05);
}

.dark-theme .audio-section {
    background-color: rgba(255,255,255,0.05);
}

#background-music {
    max-width: 100%;
    width: 300px;
    border-radius: 10px;
    background-color: #f4f4f4;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dark-theme #background-music {
    background-color: #222;
    color: #e0e0e0;
}

/* Banner Section Styling */
.banner-section {
    margin-top: 70px;
    overflow: hidden;
    max-height: 300px;
}

.banner-section img {
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.banner-section img:hover {
    transform: scale(1.02);
}

.dark-theme .banner-section img {
    filter: brightness(0.8);
}

/* Lucky Number Wheel Styling */
.lucky-number-wheel-section {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.lucky-number-wheel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.wheel-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    background-color: #3498db;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wheel-number.highlight {
    transform: scale(1.2);
    background-color: #2ecc71;
}

.wheel-number.winning-number {
    background-color: #f39c12;
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
}

#spin-wheel-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

#spin-wheel-btn:hover {
    background-color: #2980b9;
}

#spin-wheel-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

#spin-wheel-btn.spinning {
    animation: spin 1s infinite linear;
}

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

#lucky-number-result {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 15px;
}

.dark-theme .lucky-number-wheel-section {
    background-color: #1e1e1e;
    box-shadow: 0 4px 6px rgba(255,255,255,0.1);
}

.dark-theme .wheel-number {
    background-color: #2980b9;
}

.dark-theme .wheel-number.highlight {
    background-color: #27ae60;
}

.dark-theme .wheel-number.winning-number {
    background-color: #f39c12;
}

.dark-theme #spin-wheel-btn {
    background-color: #2980b9;
}

.dark-theme #lucky-number-result {
    color: #ecf0f1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .card {
        margin-bottom: 10px;
    }

    .navbar {
        padding: 10px;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    #theme-toggle {
        font-size: 1.2rem;
    }
    
    .banner-section {
        max-height: 200px;
    }
}