/* =================================================================== */
/* FreezeHost Global Stylesheet                                        */
/* =================================================================== */

/* ------------------------------------------------------------------- */
/* 1. Imports & Root Variables
/* ------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

:root {
    --primary: #3B82F6;
    --secondary: #1E40AF;
    --accent: #60A5FA;
    --background: #07080a;
    --card: #0c0d0f;
}

/* ------------------------------------------------------------------- */
/* 2. Global Styles & Scrollbar
/* ------------------------------------------------------------------- */
body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--background);
    color: #E5E7EB; /* text-gray-200 */
}

/* Global scrollbar width */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

/* Scrollbar track */
::-webkit-scrollbar-track {
    background: #1e293b; /* Tailwind gray-800 */
}

/* Scrollbar thumb */
::-webkit-scrollbar-thumb {
    background-color: #3b82f6; /* Tailwind blue-500 */
    border-radius: 8px;
    border: 3px solid #1e293b; /* padding around thumb */
}

/* Thumb hover */
::-webkit-scrollbar-thumb:hover {
    background-color: #2563eb; /* Tailwind blue-600 */
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #1e293b;
}

/* ------------------------------------------------------------------- */
/* 3. Common Components & Utilities
/* ------------------------------------------------------------------- */
.gradient-text {
    background: linear-gradient(45deg, #60A5FA, #3B82F6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card {
    background: #0c0d0f;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(96, 165, 250, 0.1);
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(96, 165, 250, 0.1);
}

.stats-card {
    background: #0c0d0f;
    border: 1px solid rgba(96, 165, 250, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(96, 165, 250, 0.1);
}

/* ------------------------------------------------------------------- */
/* 4. Buttons & Navigation
/* ------------------------------------------------------------------- */
.btn-primary {
    background: linear-gradient(45deg, var(--primary), #2544db);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-premium {
    background: transparent;
    border: 2px solid #60A5FA;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.5), 0 0 20px rgba(96, 165, 250, 0.2);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.7), 0 0 30px rgba(96, 165, 250, 0.3);
    background: rgba(96, 165, 250, 0.1);
    border-color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.discord-float {
    position: fixed;
    z-index: 40;
    background: #5865F2;
    color: white;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.discord-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(88, 101, 242, 0.6);
}

/* ------------------------------------------------------------------- */
/* 5. Mobile Menu
/* ------------------------------------------------------------------- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--background);
    transition: right 0.3s ease-in-out;
    z-index: 50;
    padding: 2rem;
    border-left: 1px solid rgba(96, 165, 250, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
    right: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 45;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ------------------------------------------------------------------- */
/* 6. Page-Specific Styles
/* ------------------------------------------------------------------- */

/* --- App Page --- */
body.page-app,
body.page-app html {
    overflow: hidden;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

.bg-grid-pattern {
    background-image: linear-gradient(to right, rgba(96, 165, 250, 0.05) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(96, 165, 250, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* --- Legal / Policy Pages (Privacy, Terms, Refund) --- */
.policy-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #93C5FD;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}
.policy-content p, .policy-content li {
    color: #D1D5DB;
    line-height: 1.75;
}
.policy-content ul {
    list-style-position: inside;
    list-style-type: disc;
    margin-top: 1rem;
    padding-left: 0.5rem;
}
.policy-content li {
    margin-bottom: 0.5rem;
}
.policy-content section:not(:last-child) {
    margin-bottom: 2.5rem;
}
.policy-content a {
    color: #60A5FA;
    text-decoration: underline;
    transition: color 0.2s;
}
.policy-content a:hover {
    color: #93C5FD;
}

/* --- Team Page --- */
#members-list, #profile-display {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #0c0d0f;
}
#members-list::-webkit-scrollbar, #profile-display::-webkit-scrollbar {
    width: 8px;
}
#members-list::-webkit-scrollbar-track, #profile-display::-webkit-scrollbar-track {
    background: transparent;
}
#members-list::-webkit-scrollbar-thumb, #profile-display::-webkit-scrollbar-thumb {
    background-color: #3b82f6;
    border-radius: 8px;
    border: 2px solid #0c0d0f;
}
.role-item.active {
    background-color: rgba(96, 165, 250, 0.15);
    color: #fff;
}
.role-item.active .role-indicator {
    transform: scaleY(1);
    opacity: 1;
}
.member-item.active {
    background-color: rgba(96, 165, 250, 0.1);
}
.mobile-card {
    background-color: var(--card);
    border: 1px solid rgba(96, 165, 250, 0.1);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.mobile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.mobile-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 14px;
    background: conic-gradient(from 180deg at 50% 50%, #3B82F6 0%, #1E40AF 50%, #60A5FA 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.mobile-card:hover::before {
    opacity: 1;
}
.mobile-card-inner {
    background-color: var(--card);
    border-radius: 12px;
    width: 100%;
    height: 100%;
}

/* --- Team Page Editor --- */
.editor-controls { display: none; }
body.editor-active .editor-controls { display: flex; }
.sortable-ghost {
    opacity: 0.4;
    background: #2d3748;
}
.modal-backdrop {
    position: fixed; inset: 0;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
}
.modal-content {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--card);
    border: 1px solid rgba(96, 165, 250, 0.2);
    z-index: 1000;
}
.modal-input {
    background-color: #1e293b;
    border: 1px solid #334155;
}
.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}
.cropper-container, #banner-cropper-img {
    max-width: 100%;
    display: block;
}

/* --- Miscellaneous --- */
#cookie-banner {
    display: none;
}
.ipr-container {
    background-color: black;
}
.faq-toggle i {
  transition: transform 0.3s ease;
}

/* ------------------------------------------------------------------- */
/* 7. Animations & Keyframes
/* ------------------------------------------------------------------- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes blob { 
    0%, 100% { transform: translate(0, 0) scale(1); } 
    25% { transform: translate(20px, -20px) scale(1.1); } 
    50% { transform: translate(0, 20px) scale(0.9); } 
    75% { transform: translate(-20px, -20px) scale(1.1); } 
}
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-blob { animation: blob 7s infinite; }
.animation-delay-2000 { animation-delay: 2s; }
.animate-spin-slow { animation: spin-slow 20s linear infinite; }

@media (min-width: 768px) {
    @keyframes smoothGlow {
        0% {
            box-shadow: 0 0 300px rgb(96, 165, 250), 0 0 600px rgb(96, 165, 250), 0 0 900px rgb(96, 165, 250);
            border-color: rgb(255, 255, 255);
            transform: scale(1.02);
        }
        100% {
            box-shadow: 0 0 15px rgba(96, 165, 250, 0.5), 0 0 30px rgba(96, 165, 250, 0.3);
            border-color: rgba(96, 165, 250, 0.5);
            transform: scale(1);
        }
    }
    .feature-card.animate-glow {
        animation: smoothGlow 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
        transform-origin: center;
    }
}

/* ------------------------------------------------------------------- */
/* 8. Media Queries & Responsive Design
/* ------------------------------------------------------------------- */
@media (min-width: 768px) {
    .discord-float {
        bottom: 32px;
        left: 32px;
    }
}

@media (max-width: 767px) {
    .discord-float {
        bottom: 24px;
        left: 24px;
    }
    .hero-text {
        padding-top: 6rem;
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .mobile-button-group {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    .mobile-button-group a {
        width: 100%;
    }
    #cookie-banner {
        padding: 1rem;
    }
    .bg-image {
        background-position: right center; /* show right-most part on phones */
    }
}

/* ------------------------------------------------------------------- */
/* Plans Section Enhancements
/* ------------------------------------------------------------------- */
#ram-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#plan-details {
    transition: all 0.3s ease;
}

#buy-now-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

#buy-now-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

.plan-selector-container select {
    transition: all 0.3s ease;
}

.plan-selector-container select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Custom RAM Dropdown Styles */
#ram-dropdown {
    user-select: none;
}

#ram-dropdown:hover {
    border-color: var(--accent);
}

#ram-dropdown:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#ram-options {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

#ram-options > div:hover {
    background-color: rgba(55, 65, 81, 0.8);
}

#ram-arrow {
    transition: transform 0.3s ease;
}

/* Selectable Container Styles */
.selectable-container {
    background: #0a0b0f;
    border: 2px solid rgba(75, 85, 99, 0.3);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(10px);
}

.selectable-container:hover {
    border-color: rgba(96, 165, 250, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(96, 165, 250, 0.1);
    background: #0c0d11;
}

.selectable-container.selected {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 1px var(--primary), 0 8px 20px rgba(59, 130, 246, 0.2);
}

.container-main-text {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.container-sub-text {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

/* Flag Rectangle Styling */
.flag-rectangle {
    background: rgba(75, 85, 99, 0.2);
    border: 1px solid rgba(75, 85, 99, 0.4);
    border-radius: 6px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 40px;
    overflow: hidden;
}

.flag-image {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.flag-image-direct {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    border: 1px solid rgba(75, 85, 99, 0.3);
    transition: all 0.3s ease;
}

.location-container:hover .flag-image-direct {
    border-color: rgba(96, 165, 250, 0.4);
    transform: scale(1.05);
}

.location-container.selected .flag-image-direct {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.location-container .flag-rectangle {
    transition: all 0.3s ease;
}

.location-container:hover .flag-rectangle {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
}

.location-container.selected .flag-rectangle {
    background: rgba(59, 130, 246, 0.3);
    border-color: var(--primary);
}

/* Plan Details Specific Styling */
#plan-details .selectable-container {
    cursor: default;
    transform: none;
    background: #0a0b0f;
    border-color: rgba(75, 85, 99, 0.3);
}

#plan-details .selectable-container:hover {
    transform: none;
    border-color: rgba(75, 85, 99, 0.3);
    background: #0a0b0f;
}

/* Gradient Border Line */
.border-gradient {
    border-image: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), var(--primary), rgba(96, 165, 250, 0.5), transparent) 1;
    border-style: solid;
    border-width: 1px 0 0 0;
}

/* Alternative gradient border using pseudo-element for better browser support */
.border-gradient {
    position: relative;
    border: none;
}

.border-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.3), var(--primary), rgba(96, 165, 250, 0.3), transparent);
}