#preloader {
    position: fixed;
    inset: 0;
    background: var(--darker);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-ring {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cursor {
    color: var(--primary);
    animation: blink 0.75s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.pulse-btn {
    animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(230, 95, 120, 0.55); }
    70% { box-shadow: 0 0 0 14px rgba(230, 95, 120, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 95, 120, 0); }
}

.scroll-down {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    animation: scrollWheel 1.6s infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(14px); }
}

.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    z-index: 900;
    transition: var(--transition);
    box-shadow: 0 6px 18px rgba(230, 95, 120, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.1);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 19, 32, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal-window {
    background: var(--white);
    width: 100%;
    max-width: 460px;
    border-radius: 16px;
    padding: 30px;
    transform: translateY(30px) scale(0.95);
    transition: var(--transition);
}

.modal-backdrop.open .modal-window {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--primary);
}

.reveal, .reveal-left, .reveal-right {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal { transform: translateY(35px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }

.reveal.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate(0, 0);
}