/* =============================================
   ROLETA NATALINA - Estilos Principais
   ============================================= */

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: sans-serif;
    background-color: #000;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1;
    background-image: url('../images/fundo.png');
    background-size: cover;
    background-position: center;
    filter: blur(8px);
}

#game-container {
    width: 100%;
    height: 100%;
    max-width: 420px;
    margin: 0 auto;
    background-image: url('../images/fundo.png');
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

#roulette-indicator {
    width: 100%;
    height: auto;
    margin-top: -30px;
    position: relative;
    z-index: 2;
}

#roulette-wheel {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    width: 88%;
    height: auto;
    z-index: 1;
}

#bonus-wheel {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    width: 35%;
    height: auto;
    z-index: 3;
}

#roulette-wheel.swaying, #roleta1-labels.swaying {
    animation: sway-roleta1 8s ease-in-out infinite;
}

#bonus-wheel.swaying, #roleta2-labels.swaying {
    animation: sway-roleta2 8s ease-in-out infinite;
}

#bonus-indicator {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 8%;
    height: auto;
    z-index: 4;
}

#bottom-bar {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 2;
}

.ui-panel {
    position: absolute;
    background-color: rgba(98, 28, 9, 0.7);
    border: 1px solid rgba(240, 100, 20, 0.5);
    border-radius: 12px;
    padding: 5px 15px;
    color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-align: left;
    z-index: 3;
    box-sizing: border-box;
}

.ui-panel .label {
    font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    margin: 0;
    padding: 0;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ui-panel .value {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    font-weight: bold;
    color: #ef4444;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

#saldo-block {
    bottom: 11%;
    left: 5%;
    width: 25%;
    min-width: 90px;
}

#ganho-block {
    bottom: 2%;
    left: 5%;
    width: 25%;
    min-width: 90px;
}

.ui-button {
    position: absolute;
    background-color: rgba(91, 16, 16, 0.7);
    border: 1px solid rgba(220, 38, 38, 0.5);
    border-radius: 12px;
    color: #ef4444;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    z-index: 3;
    box-sizing: border-box;
}

.ui-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

#normal-button {
    bottom: 20%;
    left: 5%;
    width: 25%;
    min-width: 90px;
    padding: 8px 0;
    font-size: clamp(0.7rem, 2.8vw, 0.9rem);
}

#deposit-button {
    position: absolute;
    bottom: 28%;
    left: 5%;
    width: 25%;
    min-width: 90px;
    padding: 12px 0;
    font-size: clamp(0.75rem, 2.8vw, 0.95rem);
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border: 2px solid #f87171;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4;
    box-sizing: border-box;
    animation: depositPulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

#deposit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(220, 38, 38, 0.8);
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

#deposit-button:active {
    transform: translateY(-1px);
}

@keyframes depositPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(253, 131, 3, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 30px rgba(253, 131, 3, 0.9);
        transform: scale(1.05);
    }
}

#deposit-arrow {
    position: absolute;
    bottom: 34%;
    left: 17%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    z-index: 5;
    animation: arrowBounce 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

#deposit-arrow svg {
    width: 100%;
    height: 100%;
    fill: #ef4444;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

#giro-area {
    position: absolute;
    bottom: 5%;
    right: 5%;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    z-index: 4;
}

#giro-area .ui-button {
    position: static;
    width: 56px;
    height: 38px;
    padding: 0;
}

#giro-area #giro-block {
    position: relative;
    width: auto;
    min-width: 80px;
    padding: 6px 10px;
}

#giro-block {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

#play-button {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 25%;
    min-width: 95px;
    height: auto;
    z-index: 5;
    cursor: pointer;
    transition: transform 0.2s;
}

#play-button.disabled {
    cursor: not-allowed;
    filter: grayscale(80%);
}

#play-button:active:not(.disabled) {
    transform: translateX(-50%) scale(0.95);
}

/* =============================================
   MODAIS
   ============================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

#modal-content {
    position: relative;
    width: 70%;
    max-width: 300px;
    background-color: rgba(42, 10, 1, 0.9);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    color: white;
    border: 2px solid #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-overlay.show #modal-content {
    opacity: 1;
    transform: scale(1);
}

#modal-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ef4444;
    margin: 0 0 5px 0;
}

#modal-ganho {
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    margin: 0 0 10px 0;
}

#modal-details {
    font-size: 0.8rem;
    color: #ddd;
    margin: 0;
}

#modal-button {
    background-color: #ef4444;
    border: none;
    border-radius: 8px;
    color: white;
    padding: 8px 20px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

#modal-button:hover {
    background-color: #dc2626;
}

.labels-container {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
}

#roleta1-labels {
    width: 88%;
    padding-bottom: 88%;
}

#roleta2-labels {
    width: 35%;
    padding-bottom: 35%;
}

.roulette-label {
    position: absolute;
    transform: translate(-50%, -50%);
    color: transparent;
    background-color: transparent;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
}

#roleta1-labels .roulette-label {
    padding: 2px 18px;
}

@keyframes sway-roleta1 {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-50%, -50%) rotate(20deg); }
    75% { transform: translate(-50%, -50%) rotate(-20deg); }
}

@keyframes sway-roleta2 {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-50%, -50%) rotate(-20deg); }
    75% { transform: translate(-50%, -50%) rotate(20deg); }
}

#top-right-icons {
    position: absolute;
    top: 20px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 5;
}

.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(91, 16, 16, 0.7);
    border: 1px solid rgba(220, 38, 38, 0.5);
    color: #ef4444;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.icon-button svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* =============================================
   MODAL PERFIL
   ============================================= */

#profile-modal-content {
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 16px;
    position: relative;
    background-color: rgba(15, 5, 2, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    border: none;
}

#profile-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 108, 47, 0.3);
}

#close-profile-button {
    font-size: 2rem;
    color: #ef4444;
    cursor: pointer;
    background: none;
    border: none;
}

#username-display {
    font-size: 1.2rem;
    font-weight: bold;
}

.profile-button {
    width: 80%;
    padding: 15px;
    background-color: rgba(91, 16, 16, 0.8);
    border: 1px solid rgba(220, 38, 38, 0.5);
    color: #ef4444;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.profile-button:hover {
    background-color: rgba(120, 40, 15, 0.8);
}

/* =============================================
   MODAL AUTENTICAÇÃO
   ============================================= */

.auth-modal-content {
    position: relative;
    max-width: 400px;
    width: 90%;
    background-color: #1a1a1a;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #333;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    background-color: #252525;
    border-radius: 10px;
    padding: 5px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #aaa;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.auth-tab.active {
    background-color: #ef4444;
    color: white;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form .form-group {
    position: relative;
}

.auth-form .form-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background-color: #2c2c2c;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    box-sizing: border-box;
}

.auth-form .form-input:focus {
    outline: none;
    border-color: #ef4444;
}

.auth-form .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.auth-form .form-group:focus-within .input-icon {
    color: #ef4444;
}

.auth-form .submit-btn {
    background-color: #ef4444;
    border: none;
    padding: 14px;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 0.5rem;
}

.auth-form .form-footer {
    font-size: 0.9rem;
    color: #888;
}

.auth-form .form-footer a {
    color: #ef4444;
    text-decoration: none;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
}

.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
}

#notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ef4444;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 1001;
    display: none;
    font-weight: bold;
}

#notification.error {
    background-color: #e53e3e;
}

/* =============================================
   NOTIFICAÇÕES DE SAQUE
   ============================================= */

.withdraw-notification {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    z-index: 10000;
    max-width: 220px;
    animation: slideInLeft 0.4s ease-out, fadeOut 0.5s ease-in 4.5s;
    opacity: 1;
    transform: translateX(0);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
}

.withdraw-notification.hide {
    animation: slideOutLeft 0.4s ease-in forwards;
}

.withdraw-notification-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.withdraw-notification-icon {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    flex-shrink: 0;
}

.withdraw-notification-content {
    font-size: 0.75rem;
    line-height: 1.3;
}

.withdraw-notification-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.7rem;
}

.withdraw-notification-amount {
    font-weight: 700;
    color: #fde047;
    font-size: 0.85rem;
    margin-top: 2px;
    display: block;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-300px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-300px);
        opacity: 0;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0.7;
    }
}

@media (max-width: 768px) {
    .withdraw-notification {
        top: 10px;
        left: 10px;
        max-width: 180px;
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    .withdraw-notification-header {
        font-size: 0.6rem;
    }
    
    .withdraw-notification-content {
        font-size: 0.7rem;
    }
    
    .withdraw-notification-name {
        font-size: 0.65rem;
    }
    
    .withdraw-notification-amount {
        font-size: 0.75rem;
    }
}

/* =============================================
   MODAL DEPÓSITO/SAQUE
   ============================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1250;
    overflow-y: auto;
    padding-top: 20px !important;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-container.active {
    opacity: 1;
    visibility: visible;
}

.modal-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    margin-top: 50px;
}

.modal-card {
    background-color: #101012;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid #27272a;
    width: 100%;
    background-image: none;
    padding-top: 100px;
}

.modal-close {
    position: absolute;
    top: 110px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.8);
}

.deposit-header-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    transform: translateY(-20%);
    pointer-events: none;
}

.modal-body {
    padding: 20px 25px 25px;
    position: relative;
    transition: min-height 0.2s ease-in-out;
}

.form-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    color: #a1a1aa;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.amount-input,
.text-input {
    width: 100%;
    padding: 16px;
    background: #18181b;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.amount-input:focus,
.text-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
}

.deposit-form .amount-input {
    border: 1px solid #e5484d;
    font-weight: 600;
}

.deposit-form .amount-input:focus {
    border-color: #f56a6f;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.3);
}

.min-value-notice {
    display: block;
    color: #71717a;
    font-size: 12px;
    margin-top: 8px;
}

.values-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    width: 100%;
}

.value-btn {
    background: #27272a;
    border: 1px solid #3f3f46;
    color: #e4e4e7;
    padding: 12px 5px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: clamp(11px, 2.8vw, 14px);
    white-space: nowrap;
    text-align: center;
    flex: 1 1 0;
    min-width: 60px;
}

.value-btn:hover {
    background: #3f3f46;
}

.value-btn.quente,
.value-btn.selected {
    background-color: transparent;
    border: 1px solid #facc15;
    color: #facc15;
    box-shadow: none;
}

.quente-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #facc15;
    color: #18181b;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.generate-btn {
    width: 100%;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.deposit-form .generate-btn {
    background: #ef4444;
    color: white;
    box-shadow: none;
    margin-top: 10px;
}

.deposit-form .generate-btn:hover {
    background: #f87171;
    transform: translateY(-2px);
}

.withdraw-form .generate-btn {
    background: linear-gradient(135deg, #dc2626, #dc2626);
    color: white;
    margin-top: 16px;
}

.withdraw-form .generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgb(220, 38, 38);
}

.pix-input-container {
    display: flex;
    gap: 12px;
}

.pix-selector {
    width: 100px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    color: white;
    padding: 16px 8px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
}

.pix-input {
    flex: 1;
    padding: 16px 20px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    color: white;
    font-size: 16px;
}

.pix-selector:focus,
.pix-input:focus {
    outline: none;
    border-color: #dc2626;
    background: #333333;
}

.dual-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.qr-section {
    text-align: center;
    display: none;
}

.qr-section.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 100%;
}

.qr-title {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 0;
}

.qr-description {
    color: #888888;
    margin-bottom: 0;
    font-size: 14px;
}

.qr-image-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0;
}

.qr-image {
    width: 100%;
    height: 100%;
    background: white;
    padding: 2px;
    border-radius: 16px;
}

.qr-paid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(34, 197, 94, 0.9);
    border-radius: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: white;
    z-index: 10;
}

.qr-paid-overlay.active {
    display: flex;
}

.qr-code-container {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 280px;
}

.qr-input {
    flex: 1;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: white;
}

.copy-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.input-group.compact {
    margin-bottom: 12px;
}

.rollover-notice {
    display: none;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    margin-top: -5px;
    margin-bottom: 15px;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 16, 18, 0.7);
    backdrop-filter: blur(4px);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-overlay .spinner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #dc2626;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* =============================================
   MODAL HISTÓRICO
   ============================================= */

.history-modal-content {
    position: relative;
    max-width: 420px;
    width: 90%;
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #333;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.history-modal-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 108, 47, 0.3);
    margin-bottom: 15px;
}

.history-modal-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffc83d;
}

.history-modal-close {
    font-size: 2rem;
    color: #ff9d2f;
    cursor: pointer;
    background: none;
    border: none;
}

#history-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 10px;
}

.history-item {
    background-color: #2c2c2c;
    border-radius: 8px;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 5px 15px;
    text-align: left;
    border-left: 4px solid #ef4444;
}

.history-item.loss {
    border-left-color: #e53e3e;
}

.history-item p {
    margin: 0;
    font-size: 0.9rem;
}

.history-item .label {
    color: #aaa;
    font-size: 0.8rem;
}

.history-item .value {
    font-weight: bold;
}

.history-item .result-win {
    color: #48bb78;
}

.history-item .result-loss {
    color: #e53e3e;
}

.history-item .timestamp {
    grid-column: 1 / -1;
    color: #888;
    font-size: 0.75rem;
    text-align: right;
    margin-top: 5px;
}

#no-history-message {
    color: #888;
    padding: 40px 0;
}

/* =============================================
   MODAL AFILIADO
   ============================================= */

.affiliate-modal-content {
    position: relative;
    max-width: 420px;
    width: 90%;
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #333;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

#affiliate-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding-right: 5px;
}

#affiliate-modal-body::-webkit-scrollbar {
    width: 6px;
}

#affiliate-modal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

#affiliate-modal-body::-webkit-scrollbar-thumb {
    background: #ff6c2f;
    border-radius: 10px;
}

#affiliate-modal-body::-webkit-scrollbar-thumb:hover {
    background: #ff9d2f;
}

.affiliate-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 108, 47, 0.3);
    margin-bottom: 15px;
}

.affiliate-modal-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffc83d;
}

.affiliate-modal-close {
    font-size: 2rem;
    color: #ff9d2f;
    cursor: pointer;
    background: none;
    border: none;
}

.affiliate-section {
    background-color: #252525;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.affiliate-balance-card {
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 0;
}

.affiliate-balance-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.affiliate-balance-info {
    flex: 1;
    text-align: left;
}

.affiliate-balance-label {
    font-size: 0.85rem;
    color: #a1a1aa;
    margin: 0 0 4px 0;
}

.affiliate-balance-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #22c55e;
    margin: 0;
}

.affiliate-withdraw-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.affiliate-withdraw-btn:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.affiliate-withdraw-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

.affiliate-withdraw-btn i {
    font-size: 1rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-container {
    display: flex;
    background-color: #2c2c2c;
    border: 1px solid #444;
    border-radius: 8px;
}

#affiliate-link-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #ddd;
    padding: 10px;
    font-size: 0.9rem;
    outline: none;
}

#copy-link-btn {
    background-color: #ef4444;
    border: none;
    color: white;
    padding: 0 15px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: bold;
}

.stats-grid-affiliate {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.stat-item-affiliate .value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffc83d;
}

.stat-item-affiliate .label {
    font-size: 0.8rem;
    color: #aaa;
}

.commission-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.commission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c2c2c;
    padding: 8px 12px;
    border-radius: 6px;
}

.commission-item .label { color: #ddd; }
.commission-item .value { font-weight: bold; color: #ef4444; font-size: 1.1rem; }

#affiliate-history-list {
    overflow-y: auto;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 5px;
}

.history-item-affiliate {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background-color: #2c2c2c;
    padding: 10px;
    border-radius: 6px;
    align-items: center;
    text-align: center;
}

.history-item-affiliate p { margin: 0; font-size: 0.9rem; }
.history-item-affiliate .label { font-size: 0.75rem; color: #aaa; }
.history-item-affiliate .value { font-weight: 600; }
.history-item-affiliate .user-id .value { color: #e5e7eb; }
.history-item-affiliate .deposit .value { color: #ffc83d; }
.history-item-affiliate .commission .value { color: #48bb78; }

/* =============================================
   CHECKBOX PROMOÇÃO
   ============================================= */

.promo-checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
}

.promo-checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ef4444;
    cursor: pointer;
}

.promo-checkbox-container label {
    color: #e5e7eb;
    font-size: 14px;
    cursor: pointer;
}

.bonus-tag {
    display: none;
    position: absolute;
    top: -8px;
    right: -5px;
    background: #22c55e;
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: bold;
}

.bonus-tag.active {
    display: block;
}

.max-balance {
    display: block;
    color: #71717a;
    font-size: 12px;
    margin-top: 8px;
}


