/* 
  QX Farewell - Cyberpunk Theme 
  Design System Inherited & Overridden
*/

:root {
    /* Cyberpunk Palette Overrides */
    --color-bg: #050511;
    --color-bg-alt: #0a0a1f;
    --color-primary: #00f3ff;
    /* Cyan Neon */
    --color-secondary: #bc13fe;
    /* Purple Neon */
    --color-accent: #f97316;
    /* Orange from system, kept for CTA */
    --color-success: #0aff0a;
    /* Hacker Green */
    --color-alert: #ff0055;
    --color-text: #e0e6ed;
    --color-text-dim: #94a3b8;

    /* Spacing from Design System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 3rem;
    --space-2xl: 4.5rem;

    /* Fonts */
    --font-head: 'Syncopate', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-mono);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Background Effects */
.scan-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, #000 120%);
    pointer-events: none;
    z-index: 11;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
    position: relative;
    z-index: 20;
    text-align: center;
}

/* Typography & Glitch */
h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-section {
    margin-bottom: var(--space-xl);
}

.glitch-wrapper {
    display: inline-block;
    position: relative;
    margin-bottom: var(--space-lg);
}

.glitch {
    font-size: clamp(2rem, 8vw, 5rem);
    color: var(--color-primary);
    position: relative;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--color-secondary);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--color-success);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(11px, 9999px, 83px, 0);
    }

    10% {
        clip: rect(74px, 9999px, 13px, 0);
    }

    20% {
        clip: rect(18px, 9999px, 95px, 0);
    }

    30% {
        clip: rect(4px, 9999px, 16px, 0);
    }

    40% {
        clip: rect(96px, 9999px, 49px, 0);
    }

    50% {
        clip: rect(27px, 9999px, 43px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 73px, 0);
    }

    70% {
        clip: rect(81px, 9999px, 34px, 0);
    }

    80% {
        clip: rect(57px, 9999px, 55px, 0);
    }

    90% {
        clip: rect(36px, 9999px, 5px, 0);
    }

    100% {
        clip: rect(72px, 9999px, 98px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }

    100% {
        clip: rect(2px, 9999px, 85px, 0);
    }
}

/* Image Profile Frame */
.profile-frame {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto var(--space-md);
    padding: 10px;
    background: rgba(0, 243, 255, 0.05);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* filter: grayscale(100%) contrast(1.2) brightness(0.9); Removed for color */
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.frame-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--color-primary);
    border-style: solid;
    transition: all 0.3s ease;
}

.top-left {
    top: 0;
    left: 0;
    border-width: 2px 0 0 2px;
}

.top-right {
    top: 0;
    right: 0;
    border-width: 2px 2px 0 0;
}

.bottom-left {
    bottom: 0;
    left: 0;
    border-width: 0 0 2px 2px;
}

.bottom-right {
    bottom: 0;
    right: 0;
    border-width: 0 2px 2px 0;
}

.scan-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-success);
    opacity: 0.5;
    animation: scan 3s linear infinite;
    box-shadow: 0 0 5px var(--color-success);
}

@keyframes scan {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.subtitle {
    font-size: 1.25rem;
    color: var(--color-text-dim);
    margin-top: var(--space-sm);
}

.status-badge {
    display: inline-block;
    margin-top: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--color-secondary);
    color: var(--color-secondary);
    font-size: 0.8rem;
    letter-spacing: 1px;
    background: rgba(188, 19, 254, 0.1);
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.2);
}

/* Countdown */
.countdown-container {
    margin: var(--space-xl) 0;
    padding: var(--space-xl) 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.section-title {
    color: var(--color-success);
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.time-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.05);
}

.time-val {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary);
    text-shadow: 0 0 10px var(--color-primary);
}

.label {
    font-size: 0.8rem;
    color: var(--color-text-dim);
    margin-top: var(--space-sm);
    letter-spacing: 1px;
}

.target-date {
    margin-top: var(--space-lg);
    font-size: 0.9rem;
    color: var(--color-text-dim);
    opacity: 0.8;
}

/* Career Diagnostics & Skill Tree */
.diagnostics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    text-align: left;
}

.panel {
    background: rgba(10, 10, 31, 0.7);
    border: 1px solid var(--color-primary);
    padding: var(--space-lg);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.05);
}

.panel h3 {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-lg);
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-group {
    margin-bottom: var(--space-lg);
}

.skill-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 0.9rem;
}

.progress-bar {
    height: 12px;
    background: #1e1e3f;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: var(--color-secondary);
    box-shadow: 0 0 10px var(--color-secondary);
    position: relative;
    transition: width 1s ease-in-out;
}

.glitch-fill {
    background: var(--color-success);
    animation: flash 2s infinite;
}

.comment {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-dim);
    font-style: italic;
    margin-top: 4px;
}

/* System Logs Console */
.log-console {
    background: #000;
    border: 1px solid #333;
    height: 300px;
    overflow-y: scroll;
    padding: 10px;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    color: #0f0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) #000;
}

.log-console::-webkit-scrollbar {
    width: 6px;
}

.log-console::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
}

.log-entry {
    margin-bottom: 8px;
    border-bottom: 1px dashed #333;
    padding-bottom: 4px;
}

.log-entry .time {
    color: #fff;
    opacity: 0.5;
    margin-right: 10px;
}

.log-entry .cmd {
    color: var(--color-primary);
    margin-right: 5px;
}

.log-entry .alert {
    background: var(--color-alert);
    color: #fff;
    padding: 0 4px;
}

.log-entry .error {
    color: var(--color-alert);
}

.log-entry .success {
    color: var(--color-success);
}

.log-entry .warn {
    color: yellow;
}

/* Timeline */
.escape-plan {
    margin: var(--space-2xl) 0;
    position: relative;
}

.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 27px;
    /* Aligns with center of dots (15px/2 + 20px padding) approx */
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-text-dim);
    z-index: 1;
}

.timeline-item {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 20%;
}

.timeline-item::before {
    content: '';
    display: block;
    width: 15px;
    height: 15px;
    background: #000;
    border: 2px solid var(--color-text-dim);
    border-radius: 50%;
    margin: 0 auto 10px auto;
    /* Centers the dot */
    transition: all 0.3s;
}

.timeline-item:hover::before,
.timeline-item.active::before {
    background: var(--color-success);
    border-color: var(--color-success);
    box-shadow: 0 0 15px var(--color-success);
    transform: scale(1.5);
}

.timeline-item.future::before {
    border-style: dashed;
}

.timeline-item .date {
    display: block;
    color: var(--color-primary);
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1rem;
}

.timeline-item .content {
    font-size: 0.8rem;
    color: var(--color-text-dim);
    padding: 0 5px;
}

@keyframes flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Quotes Section */
.quotes-section {
    margin-bottom: var(--space-xl);
}

.quote-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-lg);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 4px solid var(--color-success);
}

.quote-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--space-md);
    line-height: 1.4;
    font-family: sans-serif;
    /* Fallback for Chinese characters to look decent */
}

.quote-author {
    color: var(--color-primary);
    text-align: right;
    font-style: italic;
    font-size: 0.9rem;
}

/* Message Box */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-xl);
    max-width: 800px;
    margin: 0 auto var(--space-xl);
    border-left: 4px solid var(--color-accent);
}

.message-section h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: 1.25rem;
}

.message-content p {
    margin-bottom: var(--space-md);
    line-height: 1.6;
    font-size: 1.1rem;
}

.highlight-text {
    color: var(--color-accent);
    font-weight: 700;
    font-style: italic;
}

/* Button */
.cyber-btn {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 1rem 2rem;
    font-family: var(--font-head);
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    margin-top: var(--space-md);
    z-index: 1;
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    z-index: -1;
    transition: all 0.3s ease;
}

.cyber-btn:hover {
    color: #000;
    box-shadow: 0 0 20px var(--color-primary);
}

.cyber-btn:hover::before {
    left: 0;
}

/* Footer */
.cyber-footer {
    margin-top: auto;
    padding: var(--space-lg);
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-dim);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 20;
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #0a0a1f;
    border: 2px solid var(--color-primary);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.visible .modal-content {
    transform: scale(1);
}

.modal-header {
    background: rgba(0, 243, 255, 0.1);
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: 1px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: var(--space-lg);
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.5;
}

.modal-footer {
    padding: var(--space-md);
    text-align: right;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cyber-btn-small {
    background: var(--color-primary);
    color: #000;
    border: none;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
}

.cyber-btn-small:hover {
    background: #fff;
}

@media (max-width: 768px) {
    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .glitch {
        font-size: 2.5rem;
    }

    .diagnostics-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        flex-direction: column;
        gap: 30px;
        padding-left: 20px;
    }

    .timeline::before {
        width: 2px;
        height: 100%;
        left: 27px;
        top: 0;
    }

    .timeline-item {
        width: 100%;
        text-align: left;
        padding-left: 30px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-item::before {
        position: absolute;
        left: 0;
        top: 5px;
        margin: 0;
    }
}