/* ================================================
   CyberNytron - ULTIMATE ADVANCED EFFECTS CSS
   Every visual effect possible!
   ================================================ */

/* ===== MATRIX RAIN CANVAS ===== */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
}

/* ===== CUSTOM CURSOR ===== */
#custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--gold-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.2s ease, border-color 0.2s ease;
    transform: translate(-50%, -50%);
}

#custom-cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--gold-accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--gold-light);
    opacity: 0.5;
    animation: cursor-pulse 1.5s ease-in-out infinite;
}

@keyframes cursor-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.2;
    }
}

#custom-cursor.cursor-hover {
    transform: translate(-50%, -50%) scale(1.5);
    border-color: var(--gold-hover);
}

/* Hide default cursor */
body, a, button {
    cursor: none !important;
}

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 212, 255, 0.1);
    z-index: 9999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #8b5cf6, #ec4899);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--gold-accent);
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

.cyber-loader {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--gold-accent);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.loader-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: var(--accent-purple);
    animation-duration: 1s;
    animation-direction: reverse;
}

.loader-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: var(--gold-light);
    animation-duration: 0.7s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: var(--gold-accent);
}

.loading-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 0.5rem;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #8b5cf6);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--gold-accent);
}

.loading-percent {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== TERMINAL INPUT ===== */
.terminal-input {
    background: transparent;
    border: none;
    color: var(--gold-accent);
    font-family: inherit;
    font-size: inherit;
    outline: none;
    width: calc(100% - 30px);
}

.terminal-input::placeholder {
    color: var(--text-muted);
}

/* ===== CLICK RIPPLE ===== */
.click-ripple {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.6), transparent);
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: ripple-expand 1s ease-out;
    z-index: 9998;
}

@keyframes ripple-expand {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* ===== HACKER MODE ===== */
.hacker-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid var(--gold-accent);
    padding: 3rem 4rem;
    border-radius: 10px;
    z-index: 100000;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.5);
    animation: notification-appear 0.5s ease-out;
    transition: opacity 0.5s ease;
}

@keyframes notification-appear {
    from {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.notification-content {
    text-align: center;
    color: var(--gold-accent);
}

.notification-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: skull-spin 1s ease-in-out infinite;
}

@keyframes skull-spin {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.notification-content h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px var(--gold-accent);
}

.notification-content p {
    color: var(--text-secondary);
}

/* Hacker mode effects */
body.hacker-mode {
    animation: glitch-bg 0.1s infinite;
}

@keyframes glitch-bg {
    0%, 100% { filter: hue-rotate(0deg); }
    33% { filter: hue-rotate(90deg); }
    66% { filter: hue-rotate(270deg); }
}

/* ===== SECTION TRANSITIONS ===== */
.section-hidden {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== LIVE CLOCK ===== */
#live-clock {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(10, 22, 40, 0.9);
    border: 1px solid var(--gold-accent);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: var(--gold-accent);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    z-index: 999;
}

.clock-label {
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.clock-time {
    font-weight: 700;
}

/* ===== MOUSE TRAIL PARTICLES ===== */
.mouse-trail-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--gold-accent);
    border-radius: 50%;
    pointer-events: none;
    animation: trail-fade 1s ease-out;
    z-index: 9997;
}

@keyframes trail-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* ===== SHAKE ANIMATION ===== */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ===== CARD FLIP ===== */
.card-flipped {
    transform: rotateY(180deg) !important;
    transition: transform 0.6s ease !important;
}

/* ===== MINI GRAPH ===== */
#mini-graph {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(10, 22, 40, 0.9);
    border: 1px solid var(--gold-accent);
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    z-index: 999;
}

.graph-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

#activity-graph {
    display: block;
}

/* ===== GLITCH LINES ===== */
.glitch-line {
    position: fixed;
    left: 0;
    width: 100%;
    background: rgba(0, 212, 255, 0.3);
    z-index: 9996;
    animation: glitch-slide 0.1s ease-out;
}

@keyframes glitch-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== FPS COUNTER ===== */
#fps-counter {
    position: fixed;
    top: 100px;
    left: 20px;
    background: rgba(10, 22, 40, 0.9);
    border: 1px solid var(--gold-accent);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: var(--gold-accent);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    z-index: 999;
}

.fps-label {
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.fps-value {
    font-weight: 700;
}

/* ===== HEADER AUTO-HIDE ===== */
.site-header {
    transition: transform 0.3s ease !important;
}

/* ===== IMAGE LAZY LOAD ===== */
img[data-src] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* ===== RESPONSIVE - DISABLE ON MOBILE ===== */
@media (max-width: 768px) {
    #custom-cursor,
    .cursor-inner {
        display: none !important;
    }

    body, a, button {
        cursor: auto !important;
    }

    #matrix-rain {
        opacity: 0.05;
    }

    #live-clock,
    #mini-graph,
    #fps-counter {
        display: none;
    }

    .mouse-trail-particle {
        display: none;
    }
}

/* ===== ENHANCED NEON TEXT ===== (SUBTLE FOR PROFESSIONAL LOOK) */
h1, h2, h3 {
    text-shadow:
        0 0 3px rgba(0, 212, 255, 0.2),
        0 0 6px rgba(0, 212, 255, 0.1);
}

/* ===== SMOOTH SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-accent), var(--accent-purple));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-hover), var(--accent-purple));
}

/* ===== SELECTION STYLING ===== */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}

/* ===== ENHANCED FOCUS STATES ===== */
input:focus,
textarea:focus,
button:focus {
    outline: 2px solid var(--gold-accent);
    outline-offset: 2px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* ===== LINK UNDERLINE ANIMATION ===== */
a:not(.btn):not(.logo a) {
    position: relative;
}

a:not(.btn):not(.logo a)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold-accent);
    transition: width 0.3s ease;
}

a:not(.btn):not(.logo a):hover::after {
    width: 100%;
}

/* ===== GLOW ANIMATION ===== (SUBTLE FOR PROFESSIONAL LOOK) */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 3px rgba(0, 212, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
    }
}

.btn-primary,
.btn-cta {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* ===== SCAN LINE EFFECT ===== */
@keyframes scan-line {
    0% {
        top: 0%;
    }
    100% {
        top: 100%;
    }
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
    opacity: 0.3;
    animation: scan-line 3s linear infinite;
    pointer-events: none;
}
