/* Base & Reset */
html, body {
    max-width: 100vw;
    overflow-x: hidden; /* Strict prevention of horizontal scroll */
}

body {
    background-color: #050505;
    color: #ffffff;
    cursor: none; /* Hide default cursor for custom one */
}

/* Typography utility */
.text-gradient {
    background: linear-gradient(to right, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.glass-hover:hover {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* No Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Custom Cursor */
#cursor-dot,
#cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}
#cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #fff;
}
#cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Hide custom cursor on small devices */
@media (max-width: 768px) {
    body { cursor: auto; }
    #cursor-dot, #cursor-outline { display: none; }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.ken-burns {
    animation: kenburns 20s infinite alternate ease-in-out;
}
@keyframes kenburns {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: #050505;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* RTL Specifics */
html[dir="rtl"] {
    text-align: right;
}