:root {
    --e-global-color-primary: rgb(76, 194, 241);
    --e-global-color-secondary: rgb(0, 150, 212);
    --dark-bg: #101C24;
    --white: #ffffff;
    --error-color: #ff4757;
    --success-color: #2ed573;
}

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

body {
    font-family: 'Ubuntu', sans-serif;
    background-color: var(--dark-bg);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(16, 28, 36, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(76, 194, 241, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    height: 100%;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 90px 20px 20px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.section.active {
    display: block;
}

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

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 500;
    z-index: 1001;
    animation: slideDown 0.3s ease-out;
}

.flash-message.success {
    background: rgba(46, 213, 115, 0.9);
    border: 1px solid var(--success-color);
}

.flash-message.error {
    background: rgba(255, 71, 87, 0.9);
    border: 1px solid var(--error-color);
}

.flash-message.info {
    background: rgba(76, 194, 241, 0.9);
    border: 1px solid var(--e-global-color-primary);
}

@keyframes slideDown {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Form Styling */
.form-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 500;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--e-global-color-primary);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-size: 16px;
    font-family: 'Ubuntu', sans-serif;
    transition: all 0.3s ease;
}

.input-group select {
    cursor: pointer;
}

.input-group select option {
    background-color: var(--dark-bg);
    color: var(--white);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--e-global-color-primary);
    background: rgba(255, 255, 255, 0.1);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Login Section */
.login-section {
    text-align: center;
}

.login-text {
    margin-bottom: 20px;
    opacity: 0.8;
    font-size: 0.95rem;
}

/* Button Styling */
.btn-primary {
    width: 100%;
    background-color: transparent;
    padding: 18px 45px;
    background-image: linear-gradient(269deg, var(--e-global-color-primary) 0%, var(--e-global-color-secondary) 100%);
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.04);
    border: none;
    border-radius: 10px;
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 194, 241, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    background-color: transparent;
    padding: 12px 30px;
    border: 2px solid var(--e-global-color-primary);
    border-radius: 10px;
    color: var(--e-global-color-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
}

.btn-secondary:hover {
    background-color: var(--e-global-color-primary);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Error and Success Messages */
.error-message {
    color: var(--error-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
    min-height: 20px;
}

.success-message {
    color: var(--success-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
    min-height: 20px;
}

/* Geofence Warning Panel */
.geofence-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

.geofence-warning h3 {
    color: #ffc107;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.geofence-warning p {
    color: var(--white);
    margin: 5px 0;
    line-height: 1.6;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-message h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--e-global-color-primary);
}

.welcome-message p {
    font-size: 1.1rem;
    opacity: 0.8;
}

.fair-info {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Slot Machine */
.slot-machine {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


.game-actions {
    margin-top: 20px;
    text-align: center;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 28, 36, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-left: 5px solid var(--e-global-color-primary);
    border-radius: 50%;
    animation: spin-loading 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-overlay p {
    font-size: 1.1rem;
    color: var(--e-global-color-primary);
}

/* Small Loading Spinner for Button */
.loading-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-left: 2px solid var(--white);
    border-radius: 50%;
    animation: spin-loading 1s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 90px 15px 15px 15px;
    }
    
    .top-bar {
        height: 60px;
    }
    
    .logo-container {
        height: 40px;
    }
    
    .form-container,
    .slot-machine {
        padding: 20px;
    }
    
    
    .reel {
        width: 70px;
        height: 70px;
    }
    
    .symbol {
        font-size: 2rem;
    }
}

@media (max-width: 360px) {
    .reel {
        width: 60px;
        height: 60px;
    }
    
    .symbol {
        font-size: 1.8rem;
    }
    
    .btn-primary {
        padding: 15px 35px;
        font-size: 16px;
    }
}

/* Error Section (Play Page) */
.error-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.error-container {
    text-align: center;
    background: white;
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
}

.error-container h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.error-container .error-message {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

/* Game Section Enhancements */
.game-section {
    max-width: 800px;
    margin: 0 auto;
}

/* Updated Slot Display with Progressive Animation Support */
.slot-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 2rem 0;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* Enhanced Reel Styling */
.reel {
    position: relative;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Progressive Animation Symbol Styling */
.symbol {
    font-size: 2.5rem;
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease-in-out;
    opacity: 0;
    transform: scale(0.8);
}

.symbol.visible {
    opacity: 1;
    transform: scale(1);
}

.symbol.hidden {
    opacity: 0;
    transform: scale(0.8);
}

/* Enhanced Game Controls */
.game-controls {
    text-align: center;
    margin: 2rem 0;
}

.game-result {
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 2rem;
    transition: all 0.3s ease;
}

.game-result.win {
    color: #28a745;
    animation: pulseWin 0.5s ease-in-out;
}

.game-result.lose {
    color: #dc3545;
}

@keyframes pulseWin {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Prize Info Styling */
.prize-info {
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    animation: slideIn 0.5s ease-out;
    text-align: center;
}

.prize-info h3 {
    color: #28a745;
    margin-bottom: 15px;
}

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

/* Enhanced Game Stats */
.game-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-stats p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    color: var(--e-global-color-primary);
}

/* Confetti Animation */
@keyframes fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 28, 36, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.modal-content h2 {
    color: var(--error-color);
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 600;
}

.modal-content .btn-primary {
    margin-top: 10px;
}

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