/* Global Styles */
:root {
    --neon-green: #39ff14;
    --hot-pink: #ff1493;
    --electric-blue: #00ffff;
    --warning-yellow: #ffff00;
    --deep-purple: #4b0082;
    --glitch-red: #ff0040;
    --terminal-green: #33ff33;
    --bg-dark: #0a0a0a;
    --bg-lighter: #1a1a1a;
    --border: #333333;
    --text-secondary: #cccccc;
}

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

body {
    font-family: 'Courier Prime', monospace;
    background: var(--bg-dark);
    color: var(--terminal-green);
    min-height: 100vh;
    position: relative;
    overflow-x: visible;
    line-height: 1.6;
}

/* Matrix Rain Background Effect */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05;
    background-image:
        linear-gradient(0deg, transparent 50%, var(--terminal-green) 50%),
        linear-gradient(90deg, transparent 50%, var(--terminal-green) 50%);
    background-size: 50px 50px, 50px 50px;
    animation: matrix-scroll 20s linear infinite;
    z-index: -1;
}

@keyframes matrix-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
    background: rgba(10, 10, 10, 0.9);
    box-shadow: 0 0 100px rgba(57, 255, 20, 0.1);
}

/* Header */
header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 3px solid var(--neon-green);
    margin-bottom: 3rem;
    position: relative;
}

/* Header Controls - Fixed positioning to escape container clipping */
.header-controls {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    pointer-events: auto;
    user-select: none;
}

/* Language Toggle - Production Cyberpunk Styling */
.language-toggle {
    display: flex;
    background: var(--bg-lighter, #1a1a1a);
    border: 2px solid var(--border, #333333);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
    backdrop-filter: blur(10px);
    min-height: 40px;
    min-width: 100px;
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--text-secondary, #cccccc);
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 8px 16px;
    cursor: pointer !important;
    transition: all 0.2s ease;
    position: relative;
    min-width: 40px;
    outline: none;
    pointer-events: auto !important;
    user-select: none;
    z-index: 1001;
}

.lang-btn:hover {
    color: #ffffff;
    background: rgba(57, 255, 20, 0.1);
    border-color: var(--terminal-green);
    transform: scale(1.05);
}

.lang-btn.active {
    color: var(--terminal-green, #33ff33);
    background: rgba(57, 255, 20, 0.2);
    border-color: var(--terminal-green);
    box-shadow: inset 0 0 10px rgba(57, 255, 20, 0.3);
    text-shadow: 0 0 8px var(--terminal-green, #33ff33);
}

.lang-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, var(--terminal-green) 50%, transparent 70%);
    opacity: 0.1;
    animation: langSweep 2s ease-in-out infinite;
}

/* First button - rounded left edge to match container */
.lang-btn:first-child {
    border-radius: 18px 2px 2px 18px;
}

/* Last button - rounded right edge to match container */
.lang-btn:last-child {
    border-radius: 2px 18px 18px 2px;
}

@keyframes langSweep {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* Language Switching Animation */
body.lang-switching {
    transition: opacity 0.15s ease-in-out;
}

body.lang-switching .main-title,
body.lang-switching .tagline,
body.lang-switching .intro,
body.lang-switching .principle,
body.lang-switching .oath-text,
body.lang-switching .project-info,
body.lang-switching .manifesto-footer {
    transition: opacity 0.15s ease-in-out;
    opacity: 0.7;
}

.main-title {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(2rem, 8vw, 4rem);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: var(--electric-blue);
    text-shadow:
        0.05em 0 0 var(--hot-pink),
        -0.025em -0.05em 0 var(--warning-yellow),
        0.025em 0.05em 0 var(--neon-green);
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-anim-1 0.5s infinite linear alternate-reverse;
    color: var(--hot-pink);
    z-index: -1;
}

.glitch::after {
    animation: glitch-anim-2 0.5s infinite linear alternate-reverse;
    color: var(--neon-green);
    z-index: -2;
}

@keyframes glitch {
    0%, 100% { text-shadow: 0.05em 0 0 var(--hot-pink), -0.025em -0.05em 0 var(--warning-yellow), 0.025em 0.05em 0 var(--neon-green); }
    25% { text-shadow: -0.05em -0.025em 0 var(--hot-pink), 0.025em 0.025em 0 var(--warning-yellow), -0.05em -0.05em 0 var(--neon-green); }
    50% { text-shadow: 0.025em 0.05em 0 var(--hot-pink), 0.05em 0 0 var(--warning-yellow), 0 -0.05em 0 var(--neon-green); }
    75% { text-shadow: -0.025em 0 0 var(--hot-pink), -0.025em -0.025em 0 var(--warning-yellow), -0.025em -0.05em 0 var(--neon-green); }
}

@keyframes glitch-anim-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(1px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(-1px); }
}

@keyframes glitch-anim-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(30% 0 40% 0); transform: translate(2px); }
    40% { clip-path: inset(5% 0 70% 0); transform: translate(-2px); }
    60% { clip-path: inset(70% 0 10% 0); transform: translate(-1px); }
    80% { clip-path: inset(40% 0 50% 0); transform: translate(1px); }
}

.subtitle {
    display: block;
    font-family: 'VT323', monospace;
    font-size: clamp(1.5rem, 6vw, 3rem);
    color: var(--hot-pink);
    text-shadow: 2px 2px 0 var(--deep-purple);
    margin-top: -0.5rem;
}

.tagline {
    font-style: italic;
    color: var(--warning-yellow);
    font-size: 1.1rem;
    margin-top: 1rem;
    opacity: 0.8;
    animation: flicker 3s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
    75% { opacity: 0.6; }
}

/* Sections */
.preamble {
    background: linear-gradient(135deg, rgba(139, 0, 139, 0.1), rgba(0, 255, 255, 0.1));
    border: 2px dashed var(--electric-blue);
    padding: 2rem;
    margin-bottom: 3rem;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.preamble::before {
    content: "//";
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--hot-pink);
    font-size: 2rem;
    opacity: 0.3;
}

.intro {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--electric-blue);
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Principles */
.principles {
    margin-bottom: 3rem;
}

.principles h2 {
    font-family: 'Permanent Marker', cursive;
    font-size: 2.5rem;
    color: var(--neon-green);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.principle {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-lighter);
    border-left: 4px solid var(--hot-pink);
    transition: all 0.3s ease;
    position: relative;
}

.principle:hover {
    transform: translateX(10px);
    box-shadow: -5px 5px 15px rgba(255, 20, 147, 0.2);
    border-left-color: var(--neon-green);
}

.principle h3 {
    font-family: 'VT323', monospace;
    font-size: 1.8rem;
    color: var(--warning-yellow);
    margin-bottom: 1rem;
}

.principle p {
    color: var(--terminal-green);
    line-height: 1.8;
    font-size: 1.1rem;
}

.pimp {
    font-family: 'VT323', monospace;
    font-size: 5.2rem;
    color: var(--warning-yellow);
}

/* Code */
code {
    background: rgba(57, 255, 20, 0.1);
    color: var(--neon-green);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier Prime', monospace;
    border: 1px solid var(--neon-green);
}

/* Oath Section */
.oath {
    background: linear-gradient(45deg, rgba(255, 20, 147, 0.1), rgba(57, 255, 20, 0.1));
    border: 3px double var(--electric-blue);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 15px;
}

.oath h2 {
    font-family: 'Permanent Marker', cursive;
    font-size: 2.5rem;
    color: var(--hot-pink);
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.oath-text {
    font-size: 1.1rem;
    color: var(--electric-blue);
}

.oath-text ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.oath-text li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

.oath-text li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--neon-green);
    font-weight: bold;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Commandments */
.commandments {
    margin: 3rem 0;
}

.commandments h2 {
    font-family: 'Permanent Marker', cursive;
    font-size: 2.5rem;
    color: var(--electric-blue);
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.commandments-list {
    counter-reset: commandment;
    list-style: none;
    padding: 0;
}

.commandments-list li {
    counter-increment: commandment;
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 1rem;
    background: var(--bg-lighter);
    position: relative;
    color: var(--terminal-green);
    font-size: 1.1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.commandments-list li:hover {
    border-color: var(--hot-pink);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
    transform: scale(1.02);
}

.commandments-list li::before {
    content: counter(commandment, upper-roman);
    position: absolute;
    left: 0.5rem;
    font-family: 'Permanent Marker', cursive;
    color: var(--warning-yellow);
    font-size: 1.3rem;
}

/* Project Info Section */
.project-info {
    margin: 4rem 0 2rem 0;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.05), rgba(255, 20, 147, 0.05));
    border: 2px solid var(--electric-blue);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.project-info::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-green), var(--hot-pink), var(--electric-blue));
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { opacity: 0.5; transform: scaleX(0.8); }
    100% { opacity: 1; transform: scaleX(1); }
}

.project-info h2 {
    font-family: 'Permanent Marker', cursive;
    font-size: 2.2rem;
    color: var(--electric-blue);
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.project-info h3 {
    font-family: 'VT323', monospace;
    font-size: 1.6rem;
    color: var(--neon-green);
    margin-bottom: 1.5rem;
    text-align: center;
}

.project-description {
    text-align: center;
    margin-bottom: 3rem;
}

.project-description p {
    font-size: 1.1rem;
    color: var(--terminal-green);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Social Links */
.social-links {
    margin-bottom: 3rem;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: var(--bg-lighter);
    border: 2px solid transparent;
    border-radius: 25px;
    text-decoration: none;
    color: var(--terminal-green);
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.social-btn:hover::before {
    left: 100%;
}

.social-btn.twitter:hover {
    border-color: var(--electric-blue);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.social-btn.linkedin:hover {
    border-color: var(--electric-blue);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Social Links Text Color Matching */
.social-btn.twitter {
    border-color: var(--neon-green);
}

.social-btn.twitter .text {
    color: var(--neon-green);
}

.social-btn.linkedin {
    border-color: var(--electric-blue);
}

.social-btn.linkedin .text {
    color: var(--electric-blue);
}

.social-btn .icon {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.social-btn:hover .social-icon {
    transform: scale(1.1);
    filter: brightness(1.2);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Repository Info */
.repo-info {
    text-align: center;
}

.repo-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.repo-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--neon-green);
    border-radius: 20px;
    text-decoration: none;
    color: var(--neon-green);
    font-family: 'Courier Prime', monospace;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.repo-btn:hover {
    background: rgba(57, 255, 20, 0.1);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
    transform: scale(1.05);
}

.repo-btn.github:hover {
    border-color: var(--warning-yellow);
    color: var(--warning-yellow);
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.3);
}

.repo-btn.fork:hover {
    border-color: var(--hot-pink);
    color: var(--hot-pink);
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.3);
}

.repo-btn.contribute:hover {
    border-color: var(--electric-blue);
    color: var(--electric-blue);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Repository Buttons Text Color Matching */
.repo-btn.github {
    border-color: var(--warning-yellow);
}

.repo-btn.github .text {
    color: var(--warning-yellow);
}

.repo-btn.fork {
    border-color: var(--hot-pink);
}

.repo-btn.fork .text {
    color: var(--hot-pink);
}

.repo-btn.contribute {
    border-color: var(--electric-blue);
}

.repo-btn.contribute .text {
    color: var(--electric-blue);
}

.repo-btn .icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.repo-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.repo-btn:hover .repo-icon {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.repo-description {
    color: var(--terminal-green);
    font-size: 1rem;
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Footer */
.manifesto-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 3px solid var(--neon-green);
    text-align: center;
}

.signature {
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    color: var(--hot-pink);
    margin-bottom: 2rem;
}

.sig-name {
    font-size: 1.8rem;
    color: var(--neon-green);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: inline-block;
    margin-top: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.sig-date {
    font-size: 1rem;
    color: var(--warning-yellow);
    opacity: 0.8;
}

.disclaimer {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 0, 0.1);
    border: 1px dashed var(--warning-yellow);
    border-radius: 5px;
}

.disclaimer p {
    color: var(--warning-yellow);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Footer Icons */
.footer-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    margin: 0 2px;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.footer-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.heart {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-text {
    color: var(--electric-blue);
    font-weight: normal;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.5rem;
    }

    .principle {
        padding: 1rem;
    }

    .principle h3 {
        font-size: 1.4rem;
    }

    .commandments h2,
    .oath h2,
    .principles h2 {
        font-size: 1.8rem;
    }

    /* Project Info Responsive */
    .project-info {
        padding: 2rem 1rem;
        margin: 2rem 0 1rem 0;
    }

    .project-info h2 {
        font-size: 1.8rem;
    }

    .project-info h3 {
        font-size: 1.4rem;
    }

    .social-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .social-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .repo-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .repo-btn {
        width: 100%;
        max-width: 220px;
        justify-content: center;
    }

    /* Language toggle mobile adjustments */
    .header-controls {
        position: fixed; /* Ensure fixed positioning on mobile */
        top: 10px;
        right: 10px;
        z-index: 1000;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 35px;
    }
}