:root {
    /* Modern design color palette with improved harmony */
    --primary-color: #5f2eea;    /* Vibrant purple - primary action color */
    --secondary-color: #00d9f5;  /* Cyan - complementary to purple */
    --accent-color: #ff9e2c;     /* Orange - contrast accent */
    --dark-color: #1a1a2e;       /* Deep navy - background */
    --light-color: #ffffff;      /* White - text */
    
    /* Additional palette colors for variety and depth */
    --highlight-color: #fb7ba2;  /* Pink highlight */
    --neutral-color: #93a5cf;    /* Soft blue-gray */
    --depth-color: #2c2c44;      /* Dark accent */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--dark-color);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    height: 100vh;
    cursor: none;
}

/* Custom cursor - enhanced with animation and better visibility */
body {
    cursor: none; /* Hide default cursor */
}

#custom-cursor {
    position: fixed;
    width: 32px;
    height: 32px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s, opacity 0.2s;
    z-index: 9999;
    mix-blend-mode: difference; /* Ensures visibility on all backgrounds */
    
    /* Multiple layers for enhanced visibility */
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 15px var(--accent-color);
        
    /* Animated pulse for visual interest */
    animation: cursor-pulse 2s infinite alternate;
}

#cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background-color: var(--light-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s;
}

@keyframes cursor-pulse {
    0% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.portal {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: opacity 1.5s, transform 1.5s;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at center, var(--dark-color) 0%, black 100%);
    overflow: hidden;
}

.portal:not(.active) {
    opacity: 0;
    transform: scale(0.9) rotate(5deg);
    pointer-events: none;
}

.interactive-element {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: difference;
    will-change: transform;
    transition: background-color 0.5s;
}

.floating-shape {
    width: 30vh;
    height: 30vh;
    background-color: var(--primary-color);
    filter: blur(20px);
    animation: float 10s infinite ease-in-out;
    z-index: 1;
}

.orbit-shape {
    width: 15vh;
    height: 15vh;
    background-color: var(--secondary-color);
    filter: blur(10px);
    animation: orbit 15s infinite linear;
    z-index: 2;
}

.pulse-shape {
    width: 40vh;
    height: 40vh;
    background-color: var(--accent-color);
    opacity: 0.3;
    filter: blur(30px);
    animation: pulse 8s infinite ease-in-out;
    z-index: 0;
}

.portal-link {
    position: relative;
    z-index: 10;
    color: var(--light-color);
    font-size: 2rem;
    border: 2px solid var(--primary-color);
    padding: 15px 30px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.portal-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s;
}

.portal-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--primary-color);
}

.portal-link:hover::before {
    left: 100%;
}

@keyframes float {
    0%, 100% { transform: translate(5vw, 10vh); }
    25% { transform: translate(20vw, 20vh) rotate(90deg); }
    50% { transform: translate(-10vw, -15vh) rotate(180deg); }
    75% { transform: translate(-20vw, 15vh) rotate(270deg); }
}

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(30vh) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(30vh) rotate(-360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.1; }
}