/* Global Styles */
:root {
    --primary-color: #00bfff;
    --secondary-color: #ff0000;
    --accent-color: #00ffff;
    --dark-bg: #0a0a1a;
    --card-bg: rgba(0, 0, 0, 0.8);
    --text-color: #ffffff;
    --glow-color: rgba(106, 13, 173, 0.6);
    --sky-blue: #00bfff;
    --deep-red: #ff1a1a;
    --neon-green: #39ff14;
    --promo-bg: rgba(10, 5, 20, 0.9);
    --promo-border: rgba(106, 13, 173, 0.8);
    --dark-purple-bg: #0d051c;
    --glow-color-blue: rgba(0, 191, 255, 0.7);
    --glow-color-red: rgba(255, 26, 26, 0.7);
    --glow-color-green: rgba(57, 255, 20, 0.7);
}

/* Basic Layout */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a0630 100%);
    font-family: 'Almarai', sans-serif;
    color: white;
    overflow: hidden;
    position: relative;
    font-size: 16px;
}

/* Responsive Font Sizes */
@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    html {
        font-size: 12px;
    }
}

/* Users Online Box - Unified Design */
.users-online-box {
    position: fixed;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    background: rgba(25, 11, 45, 0.4);
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(156, 77, 204, 0.3);
    border: 1px solid rgba(156, 77, 204, 0.4);
    color: #fff;
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.users-online-box::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #39ff14;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
    animation: pulse 2s infinite;
}

.users-online-box:hover {
    background: rgba(25, 11, 45, 0.6);
    border-color: rgba(156, 77, 204, 0.5);
    box-shadow: 0 0 20px rgba(156, 77, 204, 0.4);
    transform: translateY(-2px);
}

.number-box {
    display: inline-flex;
    align-items: center;
}

.online-count {
    color: #39ff14;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
    font-size: 15px;
    font-weight: 700;
    font-family: 'Almarai', sans-serif;
    transition: color 0.3s ease;
}

.online-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-right: 4px;
}

@media (max-width: 768px) {
    .users-online-box {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 13px;
        gap: 6px;
    }
    
    .online-count {
        font-size: 14px;
    }
    
    .online-text {
        font-size: 13px;
    }
    
    .users-online-box::before {
        width: 6px;
        height: 6px;
    }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Screen Management */
.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 998;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Responsive padding adjustments */
@media screen and (max-width: 768px) {
    .screen {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .screen {
        padding: 10px;
    }
}

.screen.active {
    display: flex;
    opacity: 1;
}

/* Login Screen */
.login-screen-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0;
    width: 100%;
    height: 100vh;
    position: relative;
    box-sizing: border-box;
    overflow-y: auto;
}

.online-box {
    background: linear-gradient(135deg, rgba(106, 13, 173, 0.3), rgba(0, 191, 255, 0.3));
    border: 2px solid var(--sky-blue);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    width: 90%;
    max-width: 400px;
}

.online-box span {
    color: var(--neon-green);
    font-weight: bold;
}


.screen-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 20px 0;
    text-align: center;
    width: 100%;
}

/* Responsive styles for components */
@media screen and (max-width: 768px) {
    .online-box {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .screen-title {
        font-size: 1.6rem;
        margin: 15px 0;
    }
}

@media screen and (max-width: 480px) {
    .online-box {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .screen-title {
        font-size: 1.4rem;
        margin: 10px 0;
    }
}

/* Splash Screen */
.splash-title {
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #ff3131, #00bfff, #00bfff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
    text-align: center;
    width: 100%;
    padding: 0 15px;
}

/* Responsive styles for splash screen */
@media screen and (max-width: 768px) {
    .splash-title {
        font-size: 1.6rem;
        letter-spacing: 1.5px;
    }
}

@media screen and (max-width: 480px) {
    .splash-title {
        font-size: 1.4rem;
        letter-spacing: 1px;
        padding: 0 10px;
    }
}
.loading-bar-container {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 300px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar-progress {
    width: 100%;
    height: 100%;
    background-color: var(--sky-blue);
    transition: width 4s linear;
}

/* Login Screen */
.login-screen-layout {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

.online-box-container {
    position: absolute;
    top: 15px;
    left: 15px;
}

.online-box {
    background: linear-gradient(135deg, rgba(106, 13, 173, 0.3), rgba(0, 191, 255, 0.3));
    border: 2px solid var(--sky-blue);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-box span {
    color: var(--neon-green);
    font-weight: bold;
}

/* Promo Code Bar */
.promo-code-bar {
    background: linear-gradient(45deg, var(--sky-blue), #0077ff);
    border: 2px solid var(--sky-blue);
    border-radius: 12px;
    padding: 12px 15px;
    margin: 15px auto;
    width: 90%;
    max-width: 400px;
    box-shadow: 
        0 0 15px rgba(0, 191, 255, 0.3),
        inset 0 0 8px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    position: relative;
}

.promo-text-flex {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.promo-code {
    color: var(--neon-green);
    font-weight: 700;
    margin: 0 5px;
    text-shadow: 0 0 5px rgba(57, 255, 20, 0.5);
}

.copy-btn {
    background: linear-gradient(45deg, var(--sky-blue), #0077ff);
    border: 2px solid var(--sky-blue);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 15px rgba(0, 191, 255, 0.3),
        inset 0 0 8px rgba(255, 255, 255, 0.2);
}

.copy-btn:hover {
    transform: scale(1.1);
    box-shadow: 
        0 0 20px rgba(0, 191, 255, 0.5),
        inset 0 0 12px rgba(255, 255, 255, 0.3);
}

.copy-btn i {
    color: white;
    font-size: 14px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.copy-tooltip {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 191, 255, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-btn:hover .copy-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -30px;
}

/* Form Container */
.form-container {
    width: 92%;
    max-width: 350px;
    padding: 15px;
    border-radius: 15px;
    border: 2px solid var(--sky-blue);
    background: rgba(10, 5, 20, 0.95);
    box-shadow: 
        0 0 15px rgba(0, 191, 255, 0.4);
    backdrop-filter: blur(10px);
    position: relative;
    margin: 10vh auto 4vh auto;
}

.input-wrapper-new {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--sky-blue);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-wrapper-new input {
    flex-grow: 1;
    padding: 10px 45px 10px 15px;
    border: none;
    background: transparent;
    color: white;
    font-size: 1rem;
    outline: none;
}

.input-wrapper-new input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-icon-new {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, var(--sky-blue), #0077ff);
    border: 2px solid var(--sky-blue);
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(0, 191, 255, 0.5),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
}

.input-icon-new i {
    color: white;
    font-size: 14px;
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* Buttons */


.bottom-button {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 999;
    padding: 0 20px;
}



.code-btn {
    width: 90%;
    max-width: 400px;
    height: 45px;
    background: linear-gradient(45deg, var(--deep-red), #ff4d4d);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 26, 26, 0.3);
    margin: 0 auto;
}

.code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 26, 26, 0.4);
}

/* Warning Message */
.warning-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.warning-icon {
    min-width: 24px;
    height: 24px;
    color: var(--warning-orange);
    margin-top: 2px;
}

.warning-message p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #fff;
}

/* Success Alert */
#simple-alert-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    z-index: 1000;
    display: none;
}

.simple-alert.success {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid var(--sky-blue);
    animation: fadeIn 0.3s;
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.5;
        box-shadow: 0 0 20px rgba(0, 191, 255, 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 30px rgba(0, 191, 255, 0.5);
    }
}

/* Bottom Buttons */
.bottom-buttons {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 0 20px;
    z-index: 999;
}

.bottom-btn {
    flex: 1;
    max-width: 200px;
    height: 45px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bottom-btn i {
    font-size: 1.1rem;
}

.promo-btn {
    background: linear-gradient(45deg, var(--sky-blue), #0077ff);
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}

.promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.4);
}

.code-btn {
    background: linear-gradient(45deg, var(--deep-red), #ff4d4d);
    box-shadow: 0 4px 15px rgba(255, 26, 26, 0.3);
}

.code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 26, 26, 0.4);
}

/* Media Queries */
@media (max-width: 480px) {
    .login-screen-layout {
        padding: 15px;
    }

    .online-box-container {
        position: absolute;
        top: 15px;
        left: 15px;
        width: auto;
    }

    .online-box {
        font-size: 0.9rem;
        padding: 8px 15px;
        white-space: nowrap;
    }

    .promo-code-bar {
        padding: 8px 10px;
        width: calc(100% - 20px);
        margin: 0 10px 15px 10px;
    }

    .form-container {
        width: 100%;
        padding: 20px;
        margin: 20px 0;
    }

    .input-wrapper-new {
        margin-bottom: 15px;
        height: 45px;
    }

    .input-wrapper-new input {
        font-size: 1rem;
        padding: 12px 45px 12px 15px;
    }

    .submit-btn-new,
    .get-code-btn-new {
        height: 45px;
        font-size: 1rem;
        margin-top: -25px; /* softer raise on small screens (slightly increased) */
    }
}

/* Quick override: raise the form box higher on the screen */
.login-screen-layout.override-raise {
    padding-top: 0 !important;
}

.login-screen-layout {
    /* ensure default is reset where needed (last rule wins) */
    padding-top: 0;
}

.form-container {
    transform: translateY(-300px); /* lift the form up much higher */
    margin-top: 0; /* remove extra spacing */
}

@media (max-width: 480px) {
    .form-container {
        width: 90%;
        padding: 20px;
        margin: 10px auto;
    }
    .input-wrapper-new {
        margin-bottom: 25px;
    }
}