@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

body { 
    font-family: 'Inter', sans-serif; 
    background-color: #0a0b10; 
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
}

/* 4x4 Grid Texture Overlay using the uploaded pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://i.imgur.com/dfkFCSB.png');
    background-size: 200px 200px; /* 2x bigger */
    background-repeat: repeat;
    opacity: 0.02; /* Softer and more faded */
    filter: invert(100%) blur(0.5px); /* Make it white and slightly blurred */
    pointer-events: none;
    z-index: 1;
}

/* Home Page Container */
#homePage {
    position: relative;
}

/* Dual Radial Gradients for Home Page */
#homePage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 900px 900px at 0% 50%, rgba(59, 130, 246, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 900px 900px at 100% 50%, rgba(59, 130, 246, 0.18) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* Ensure all home page content is above the gradient */
#homePage > * {
    position: relative;
    z-index: 1;
}

.neon-blue {
    color: #3b82f6 !important;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Subtle italic styling for logo text */
.logo-text-italic {
    font-style: italic;
    font-variation-settings: 'slnt' -3; /* Very subtle slant */
}

.btn-blue {
    background-color: #3b82f6;
    color: #ffffff;
    border: 3px solid #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.btn-blue:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.btn-blue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-dark {
    background-color: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(80, 80, 80, 0.3);
    transition: all 0.3s ease;
    color: #888888;
}

.btn-dark:hover {
    background-color: rgba(40, 40, 40, 0.9);
    border-color: rgba(100, 100, 100, 0.5);
    transform: translateY(-2px);
    color: #aaaaaa;
}

.card-glass {
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.sidebar {
    background-color: #000000;
    border-right: 1px solid rgba(128, 128, 128, 0.3);
    transition: transform 0.3s ease;
}

.sidebar.mobile-hidden {
    transform: translateX(-100%);
}

@media (max-width: 1150px) {
    .sidebar {
        z-index: 100;
    }
    
    .sidebar:not(.mobile-open) {
        transform: translateX(-100%);
    }
}

.mobile-topbar {
    display: none;
    background-color: #000000;
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
    padding: 16px 20px;
}

@media (max-width: 1150px) {
    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

.hamburger {
    cursor: pointer;
    transition: all 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    backdrop-filter: blur(4px);
}

.mobile-overlay.active {
    display: block;
}

@media (max-width: 1150px) {
    .main-content {
        margin-left: 0 !important;
        padding-top: 80px !important;
    }
}

.sidebar-item {
    padding: 14px 16px;
    margin: 6px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: transparent;
    position: relative;
}

.sidebar-item:hover {
    background-color: rgba(75, 85, 99, 0.3);
    transform: scale(1.02);
}

.sidebar-item.active {
    background-color: rgba(59, 130, 246, 0.15);
    border-radius: 10px;
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #3b82f6;
    border-radius: 0 3px 3px 0;
    box-shadow: -3px 0 8px rgba(59, 130, 246, 0.6);
}

.online-dot {
    height: 8px;
    width: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #3b82f6;
    animation: pulse 2s infinite;
}

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

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.payment-method-card {
    background: rgba(20, 20, 20, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-method-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.crypto-option {
    background: rgba(20, 20, 20, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.crypto-option:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.deposit-input {
    background: #000000;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-size: 24px;
    font-weight: 900;
    width: 100%;
    outline: none;
}

.deposit-input:focus {
    border-color: rgba(59, 130, 246, 0.5);
}

.hidden {
    display: none !important;
}

.logo-glow {
    transition: all 0.3s ease;
}

.logo-glow:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.6));
}

.title-glow {
    transition: all 0.4s ease;
    cursor: pointer;
}

.title-glow:hover {
    transform: scale(1.05);
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.8), 0 0 60px rgba(59, 130, 246, 0.4);
}

.status-card {
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
}

.lock-icon {
    width: 60px;
    height: 60px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.plan-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    padding: 20px 0;
    margin-bottom: 0;
}

.plan-item:last-child {
    border-bottom: none;
}

.plan-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin: 16px 0 12px 0;
}

.plan-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.plan-card {
    position: relative;
}

.plan-card.selected {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

#card-element {
    background: #000000;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
}

#card-element.StripeElement--focus {
    border-color: rgba(59, 130, 246, 0.5);
}

#card-errors {
    color: #ef4444;
    font-size: 12px;
    margin-top: 8px;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

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

.duration-btn {
    position: relative;
    transition: all 0.3s ease;
}

.duration-btn:hover {
    transform: translateY(-2px);
}

.duration-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.duration-btn.active::before {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Enhanced Plan Cards with Hover Effects */
.plan-card-enhanced {
    position: relative;
    transform-origin: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.plan-card-enhanced::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1rem;
    padding: 2px;
    background: transparent;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.plan-card-enhanced:hover {
    transform: scale(1.05) translateY(-4px);
}

.plan-card-enhanced:not(:hover) {
    transform: scale(1) translateY(0);
}

.plan-card-enhanced:hover::before {
    opacity: 1;
}

/* Plan-specific glow colors */
#planBASIC::before {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

#planBASIC:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4), 0 0 80px rgba(59, 130, 246, 0.2);
}

#planPRO::before {
    background: linear-gradient(135deg, #a855f7, #c084fc);
}

#planPRO:hover {
    border-color: #a855f7 !important;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.4), 0 0 80px rgba(168, 85, 247, 0.2);
}

#planPREMIUM::before {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

#planPREMIUM:hover {
    border-color: #ef4444 !important;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.4), 0 0 80px rgba(239, 68, 68, 0.2);
}

/* Keep glow when selected */
.plan-card-enhanced.selected {
    transform: scale(1.05) translateY(-4px);
}

.plan-card-enhanced.selected::before {
    opacity: 1;
}

#planBASIC.selected {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4), 0 0 80px rgba(59, 130, 246, 0.2);
}

#planPRO.selected {
    border-color: #a855f7 !important;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.4), 0 0 80px rgba(168, 85, 247, 0.2);
}

#planPREMIUM.selected {
    border-color: #ef4444 !important;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.4), 0 0 80px rgba(239, 68, 68, 0.2);
}

/* Confetti Animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 10002;
    pointer-events: none;
}

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

/* Modal z-index fix - ensure it's above blur */
.modal {
    z-index: 10000 !important;
}

.modal.active {
    display: flex;
}

/* Toast animations */
@keyframes slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out forwards;
}

.animate-slide-out {
    animation: slide-out 0.3s ease-out forwards;
}

/* FIXED: Toast container positioning - FAR bottom right corner, ABOVE everything */
#toastContainer {
    pointer-events: none;
    z-index: 99999 !important; /* Higher than modal (10000) */
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

#toastContainer > div {
    pointer-events: auto;
    min-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile responsive toasts */
@media (max-width: 640px) {
    #toastContainer {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
    
    #toastContainer > div {
        min-width: auto;
        width: 100%;
    }
}

.logout-modal-content {
    background: rgba(15, 15, 15, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modal-slide-in 0.3s ease-out;
}

@keyframes modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logout-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.logout-icon i {
    font-size: 36px;
    color: #ef4444;
}

.logout-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.logout-modal-buttons button {
    flex: 1;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-cancel {
    background: rgba(75, 85, 99, 0.3);
    border: 2px solid rgba(75, 85, 99, 0.5);
    color: #9ca3af;
}

.btn-cancel:hover {
    background: rgba(75, 85, 99, 0.5);
    border-color: rgba(75, 85, 99, 0.7);
    color: #d1d5db;
    transform: translateY(-2px);
}

.btn-logout {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 2px solid #ef4444;
    color: white;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-logout:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

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

/* Responsive */
@media (max-width: 640px) {
    .logout-modal-content {
        padding: 32px 24px;
    }
    
    .logout-modal-buttons {
        flex-direction: column-reverse;
    }
    
    .logout-modal-buttons button {
        width: 100%;
    }
}