@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--neon-primary) var(--bg-color);
}

html::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-track {
    background: var(--bg-color);
}

html::-webkit-scrollbar-thumb {
    background: var(--neon-primary);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--neon-primary);
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-color);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Cyber Grid Background */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridShift 20s linear infinite;
    pointer-events: none;
    z-index: -2;
}

@keyframes gridShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Scanning Line */
.scanning-line {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-primary), transparent);
    box-shadow: 0 0 10px var(--neon-primary);
    animation: scan 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Glow Intensity Variants */
body[data-glow="low"] {
    --glow-size: 5px;
    --glow-opacity: 0.3;
}

body[data-glow="medium"] {
    --glow-size: 10px;
    --glow-opacity: 0.6;
}

body[data-glow="high"] {
    --glow-size: 20px;
    --glow-opacity: 0.9;
}

/* Share Container */
.share-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-primary);
    color: var(--neon-primary);
    font-size: 18px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Main Container */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* Profile Section */
.profile-section {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInUp 1s ease-out;
}

/* Avatar */
.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.avatar-frame {
    position: relative;
    width: 140px;
    height: 140px;
    border: 3px solid var(--neon-primary);
    border-radius: 20px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 0 var(--glow-size) var(--neon-primary),
        inset 0 0 var(--glow-size) rgba(0, 255, 255, 0.1);
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    filter: brightness(1.1) contrast(1.2);
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 255, 255, 0.2) 50%,
        transparent 70%
    );
    animation: scanOverlay 2s ease-in-out infinite;
    border-radius: 15px;
}

@keyframes scanOverlay {
    0% { transform: translateX(-100%) translateY(-100%); }
    100% { transform: translateX(100%) translateY(100%); }
}

.status-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--neon-secondary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-secondary);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Profile Text */
.cyber-title {
    font-family: 'Orbitron', monospace;
    font-size: 32px;
    font-weight: 700;
    color: var(--neon-primary);
    text-shadow: 0 0 var(--glow-size) var(--neon-primary);
    margin-bottom: 15px;
    position: relative;
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    color: var(--neon-secondary);
    animation: glitch1 0.5s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
    color: var(--neon-primary);
    animation: glitch2 0.5s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
    0%, 14%, 15%, 49%, 50%, 99%, 100% { transform: translateX(0); }
    1%, 13% { transform: translateX(-2px); }
    16%, 48% { transform: translateX(2px); }
}

@keyframes glitch2 {
    0%, 20%, 21%, 62%, 63%, 99%, 100% { transform: translateX(0); }
    1%, 19% { transform: translateX(2px); }
    22%, 61% { transform: translateX(-2px); }
}

.cyber-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

.terminal-text {
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* Social Grid */
.social-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-node {
    position: relative;
    width: 60px;
    height: 60px;
    text-decoration: none;
    color: var(--neon-primary);
}

.node-core {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 2;
}

.node-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 1px solid var(--neon-secondary);
    border-radius: 50%;
    opacity: 0;
    animation: nodeRotate 3s linear infinite;
}

.social-node:hover .node-core {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--neon-primary);
}

.social-node:hover .node-ring {
    opacity: 1;
}

@keyframes nodeRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.social-icon-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    filter: brightness(1.2);
}

/* Links Matrix */
.links-matrix {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cyber-link {
    position: relative;
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--neon-primary);
    border-radius: 10px;
    text-decoration: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
    animation: linkFadeIn 0.8s ease-out both;
}

@keyframes linkFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: linear-gradient(45deg, var(--neon-primary), var(--neon-secondary)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cyber-link:hover .link-border {
    opacity: 1;
}

.link-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    z-index: 2;
    position: relative;
}

.link-icon-container {
    width: 40px;
    height: 40px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--neon-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--neon-primary);
}

.link-icon-img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.link-label {
    flex: 1;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Rajdhani', sans-serif;
}

.link-arrow {
    color: var(--neon-secondary);
    font-size: 16px;
    transition: transform 0.3s ease;
}

.cyber-link:hover .link-arrow {
    transform: translateX(5px);
}

.link-scanner {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cyber-link:hover .link-scanner {
    left: 100%;
}

.cyber-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
}

/* Animation Variants */
body[data-animation="pulse"] .neon-button,
body[data-animation="pulse"] .cyber-title,
body[data-animation="pulse"] .link-icon-container {
    animation: neonPulse 2s ease-in-out infinite;
}

body[data-animation="flicker"] .neon-button,
body[data-animation="flicker"] .cyber-title,
body[data-animation="flicker"] .link-icon-container {
    animation: neonFlicker 1.5s linear infinite;
}

body[data-animation="wave"] .cyber-link {
    animation: neonWave 3s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% { box-shadow: 0 0 var(--glow-size) var(--neon-primary); }
    50% { box-shadow: 0 0 calc(var(--glow-size) * 1.5) var(--neon-primary); }
}

@keyframes neonFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
    75% { opacity: 1; }
    85% { opacity: 0.9; }
}

@keyframes neonWave {
    0%, 100% { border-color: var(--neon-primary); }
    50% { border-color: var(--neon-secondary); }
}

/* Widgets Terminal */
.widgets-terminal {
    width: 100%;
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--neon-primary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.terminal-header {
    background: rgba(0, 255, 255, 0.1);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--neon-primary);
}

.terminal-title {
    font-family: 'Courier New', monospace;
    color: var(--neon-primary);
    font-size: 14px;
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--neon-primary);
}

.minimize { background: var(--neon-secondary); }
.maximize { background: var(--neon-primary); }
.close { background: #ff4444; }

.terminal-content {
    padding: 20px;
    font-family: 'Courier New', monospace;
    color: #ffffff;
}

/* Button Styles */
.neon-button {
    position: relative;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--neon-primary);
    color: var(--neon-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.neon-button:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px var(--neon-primary);
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.neon-button:hover .button-glow {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 20px 15px;
    }
    
    .cyber-title {
        font-size: 24px;
    }
    
    .cyber-description {
        font-size: 14px;
    }
    
    .cyber-link {
        padding: 15px 20px;
    }
    
    .link-label {
        font-size: 16px;
    }
    
    .social-grid {
        gap: 15px;
    }
    
    .social-node {
        width: 50px;
        height: 50px;
    }
    
    .node-core {
        font-size: 20px;
    }
    
    .avatar-frame {
        width: 120px;
        height: 120px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
