html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* Performance Optimizations */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #050510;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a855f7 0%, #06b6d4 50%, #10b981 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #a855f7 0%, #06b6d4 35%, #10b981 70%, #f97316 100%);
        width: 10px;
    }

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #06b6d4 #050510;
}

.text-glow {
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    will-change: text-shadow;
}

.box-glow:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.5), 0 0 50px rgba(168, 85, 247, 0.3);
}

.gradient-text {
    background: linear-gradient(to right, #a855f7, #06b6d4, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.triad-hover {
    transition: all 0.3s ease;
}

    .triad-hover:hover {
        border-color: transparent;
        background: linear-gradient(#050510, #050510) padding-box, linear-gradient(to right, #a855f7, #06b6d4, #10b981) border-box;
        border: 1px solid transparent;
        color: white;
    }

    .triad-hover i {
        transition: color 0.3s ease;
    }

    .triad-hover:hover i {
        background: linear-gradient(to right, #a855f7, #06b6d4, #10b981);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.bg-grid-animated {
    background-size: 50px 50px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
    will-change: transform;
    transform: translateZ(0);
}

.cube-shape {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-30deg) rotateY(45deg);
}

.nav-link {
    position: relative;
}

    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: -4px;
        left: 0;
        background: linear-gradient(90deg, #a855f7, #06b6d4);
        transition: width 0.3s;
    }

    .nav-link:hover::after {
        width: 100%;
    }

.perspective-1000 {
    perspective: 1000px;
}

.rotate-y-12 {
    transform: rotateY(12deg);
}

section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 5000px;
}

/* Page Transition Spinner */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #050510 0%, #0a0a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

    .page-loader.fade-out {
        opacity: 0;
        pointer-events: none;
    }

.spinner-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.spinner-logo {
    width: 120px;
    height: 120px;
    position: relative;
    animation: logoFloat 3s ease-in-out infinite;
}

    .spinner-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.6));
    }

.spinner-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border: 3px solid transparent;
    border-top-color: #06b6d4;
    border-right-color: #a855f7;
    border-bottom-color: #10b981;
    border-left-color: #f97316;
    border-radius: 50%;
    animation: spinRing 1.5s linear infinite;
}

.spinner-text {
    color: #06b6d4;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes spinRing {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}
