/* Custom CSS untuk efek tambahan yang tidak bisa dicapai dengan Tailwind */

/* Glowing text effect */
.glow-text {
    text-shadow: 0 0 10px #00d2ff, 0 0 20px #00d2ff, 0 0 30px #00d2ff;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00d2ff, #6366f1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6366f1, #00d2ff);
}

/* Selection color */
::selection {
    background: #00d2ff;
    color: #0a0a0a;
}

::-moz-selection {
    background: #00d2ff;
    color: #0a0a0a;
}

/* Project Modal Styles */
#project-modal {
    backdrop-filter: blur(10px);
    animation: modalFadeIn 0.3s ease-out;
}

#project-modal .bg-cyber-gray {
    animation: modalSlideUp 0.3s ease-out;
    box-shadow: 0 25px 50px -12px rgba(0, 210, 255, 0.25);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Project gallery hover effects */
.project-gallery-item {
    transition: all 0.3s ease;
}

.project-gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.3);
}

/* Animated border for cards */
.animated-border {
    position: relative;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(45deg, #00d2ff, #6366f1, #00d2ff, #6366f1);
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% {
        background: linear-gradient(45deg, #00d2ff, #6366f1, #00d2ff, #6366f1);
    }
    25% {
        background: linear-gradient(135deg, #6366f1, #00d2ff, #6366f1, #00d2ff);
    }
    50% {
        background: linear-gradient(225deg, #00d2ff, #6366f1, #00d2ff, #6366f1);
    }
    75% {
        background: linear-gradient(315deg, #6366f1, #00d2ff, #6366f1, #00d2ff);
    }
    100% {
        background: linear-gradient(45deg, #00d2ff, #6366f1, #00d2ff, #6366f1);
    }
}

/* Holographic effect */
.holographic {
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 210, 255, 0.1) 50%,
        transparent 70%
    );
    background-size: 200% 200%;
    animation: holographicShine 3s ease-in-out infinite;
}

@keyframes holographicShine {
    0%, 100% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
}

/* Glitch effect */
.glitch {
    position: relative;
    color: #fff;
    font-weight: bold;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #00d2ff;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #6366f1;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 14%, 15%, 49%, 50%, 99%, 100% {
        transform: translate(0);
    }
    15%, 49% {
        transform: translate(-2px, 0);
    }
}

@keyframes glitch-2 {
    0%, 20%, 21%, 62%, 63%, 99%, 100% {
        transform: translate(0);
    }
    21%, 62% {
        transform: translate(2px, 0);
    }
}

/* Neon glow button */
.neon-button {
    position: relative;
    background: transparent;
    border: 2px solid #00d2ff;
    color: #00d2ff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.neon-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.4), transparent);
    transition: left 0.5s;
}

.neon-button:hover::before {
    left: 100%;
}

.neon-button:hover {
    box-shadow: 
        0 0 10px #00d2ff,
        0 0 20px #00d2ff,
        0 0 30px #00d2ff,
        inset 0 0 10px rgba(0, 210, 255, 0.1);
    text-shadow: 0 0 10px #00d2ff;
}

/* Loading spinner */
.cyber-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #1a1a1a;
    border-top: 3px solid #00d2ff;
    border-radius: 50%;
    animation: cyberSpin 1s linear infinite;
}

@keyframes cyberSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse effect */
.cyber-pulse {
    animation: cyberPulse 2s infinite;
}

@keyframes cyberPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Text gradient */
.gradient-text {
    background: linear-gradient(45deg, #00d2ff, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Futuristic form inputs */
.cyber-input {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cyber-input:focus {
    outline: none;
    border-color: #00d2ff;
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2);
    background: rgba(26, 26, 26, 0.9);
}

.cyber-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Floating animation for elements */
.float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

.float-medium {
    animation: floatMedium 4s ease-in-out infinite;
}

.float-fast {
    animation: floatFast 2s ease-in-out infinite;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes floatMedium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes floatFast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Cyber grid background */
.cyber-grid-bg {
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0, 210, 255, 0.15) 1px, transparent 0);
    background-size: 20px 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glitch::before,
    .glitch::after {
        display: none;
    }
    
    .animated-border::before {
        animation-duration: 2s;
    }
    
    .holographic {
        animation-duration: 2s;
    }
    
    /* Typewriter text responsive handling */
    .typewriter {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .animated-border::before,
    .holographic,
    .glitch::before,
    .glitch::after,
    .cyber-pulse,
    .gradient-text,
    .float-slow,
    .float-medium,
    .float-fast {
        animation: none;
    }
}

/* Print styles */
@media print {
    .cyber-grid,
    .cyber-grid-bg,
    .animated-border::before {
        display: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
