:root {
    --bg-dark: #050508;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --accent-cyan: #00ffff;
    --accent-cyan-glow: rgba(0, 255, 255, 0.3);
    --accent-violet: #8b5cf6;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-dim: rgba(255, 255, 255, 0.4);
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Syne', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 20px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html, body {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    position: relative;
}

/* Starfield Background Canvas */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Glassmorphic Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.05;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
}

/* Cursor Glow Effect */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    filter: blur(80px);
    transition: opacity 1s ease;
}

/* Main Container */
.app-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    position: relative;
    z-index: 20;
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.logo span {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan-glow);
}

.status-indicator {
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    letter-spacing: 2px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px #10b981;
    animation: simplePulse 2s infinite ease-in-out;
}

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

/* VIEW SECTIONS */
.view-section {
    display: none;
    flex: 1;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    z-index: 15;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.view-section::-webkit-scrollbar {
    width: 6px;
}
.view-section::-webkit-scrollbar-track {
    background: transparent;
}
.view-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.view-section.active {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hero-content, .parse-card, .loader-content {
    margin: auto auto;
    width: 100%;
}

/* GLASS CARD COMMON */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 24px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
    transition: var(--transition-smooth);
}

/* HERO / LANDING VIEW */
.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.25;
    padding: 0.1em 0;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* INPUT PANEL */
.input-panel {
    padding: 3rem;
    margin-bottom: 2rem;
    position: relative;
}

.input-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.input-group {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.5rem;
    font-size: 1.4rem;
    color: var(--text-dim);
    transition: var(--transition-smooth);
}

.input-wrapper input {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.input-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    background: rgba(0, 0, 0, 0.6);
}

.input-wrapper input:focus + .input-icon {
    color: var(--accent-cyan);
}

/* GLOW BUTTON */
.btn-glow-pulse {
    position: relative;
    padding: 1.2rem 2.5rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 12px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition-smooth);
    letter-spacing: 1px;
}

.btn-glow-pulse span {
    position: relative;
    z-index: 5;
}

.btn-glow-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: var(--accent-cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.btn-glow-pulse:hover {
    color: #000;
    box-shadow: 0 0 35px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-glow-pulse:hover::after {
    transform: translate(-50%, -50%) scale(1.5);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--glass-border);
}

.divider:not(:empty)::before { margin-right: 1.5rem; }
.divider:not(:empty)::after { margin-left: 1.5rem; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.w-full {
    width: 100%;
}

.featured-banner {
    margin-top: 4rem;
    font-size: 0.9rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.author-link {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--text-dim);
    transition: var(--transition-smooth);
}

.author-link:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

/* OFFLINE LOG PARSER VIEW */
.parse-card {
    padding: 3.5rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.parse-card h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.code-copy-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    overflow: hidden;
}

.code-copy-box code {
    white-space: nowrap;
    overflow-x: auto;
    padding-right: 1.5rem;
    flex: 1;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.code-copy-box code::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.code-copy-box code {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.btn-copy {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.btn-copy:hover {
    color: var(--text-primary);
}

#gitLogInput {
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    resize: none;
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
}

#gitLogInput:focus {
    border-color: var(--accent-violet);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    background: rgba(0, 0, 0, 0.55);
}

.btn-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-close:hover {
    color: var(--text-primary);
}

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

/* LOADING SCREEN */
#loadingView {
    align-items: center;
    justify-content: center;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.cosmic-ring {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent-cyan);
    border-bottom-color: var(--accent-violet);
    animation: loaderRotate 2s cubic-bezier(0.68, -0.6, 0.32, 1.6) infinite;
}

.cosmic-ring::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-left-color: var(--accent);
    border-right-color: var(--accent-cyan);
    animation: loaderRotate 1s ease-in-out infinite reverse;
}

.ring-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--text-primary) 0%, transparent 80%);
    border-radius: 50%;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.8));
    animation: corePulse 1.5s ease-in-out infinite;
}

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

@keyframes corePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

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

.loader-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.loader-status-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-cyan);
}

.loader-progress-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.loader-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-cyan), var(--accent-violet));
    border-radius: 100px;
    box-shadow: 0 0 10px var(--accent-cyan-glow);
    transition: width 0.1s ease;
}

/* STORY PLAYER VIEW */
#storyView {
    max-width: 100vw;
    padding: 0;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

#storyView.active {
    display: flex;
}

.slides-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    overflow: hidden;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.96) translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 8vh 12% 16vh;
}

.slide-item.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

/* SLIDE LAYOUTS */
.slide-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 6rem;
    align-items: center;
    width: 100%;
}

.slide-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.slide-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    border: 1px solid var(--accent-cyan-glow);
    background: rgba(0, 255, 255, 0.03);
    padding: 0.4rem 1.2rem;
    border-radius: 100px;
}

.slide-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 3rem;
}

/* IDENTITY SLIDE SPECIFICS */
.avatar-col {
    display: flex;
    justify-content: center;
}

.avatar-glow-ring {
    position: relative;
    width: clamp(160px, 20vw, 240px);
    height: clamp(160px, 20vw, 240px);
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-violet));
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.15);
}

.dev-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-dark);
}

.info-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.dev-name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 0.5rem;
}

.dev-username {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--accent-cyan);
    margin-bottom: 2rem;
}

.dev-bio {
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 600px;
}

.meta-row {
    display: flex;
    gap: 3.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* STATS SLIDE */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    width: 100%;
    max-width: 1000px;
}

.stat-card {
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.stat-icon {
    font-size: 2rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--text-dim);
}

/* LANGUAGE NEBULA SLIDE */
.chart-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nebula-chart-container {
    position: relative;
    width: 320px;
    height: 320px;
}

.language-legend {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
    max-width: 450px;
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.legend-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-name {
    font-weight: 600;
    font-size: 1rem;
}

.legend-percentage {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-cyan);
}

/* REPOSITORIES SLIDE */
.repos-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 1100px;
}

.repo-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.2rem;
    height: 260px;
    text-align: left;
    text-decoration: none;
    color: inherit;
    border-radius: 18px;
}

.repo-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.08);
    transform: translateY(-4px);
}

.repo-top {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.repo-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    word-break: break-all;
}

.repo-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.repo-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.repo-lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.repo-lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.repo-stars {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-dim);
}

/* SUMMARY / PORTFOLIO ASSESSMENT SLIDE */
.summary-grid {
    grid-template-columns: 1.3fr 1fr;
    gap: 5rem;
}

.summary-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.summary-grade-box {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin: 2rem 0 3.5rem;
    width: 100%;
}

.grade-circle {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.2);
}

.grade-val {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: #000;
    line-height: 1;
}

.grade-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: rgba(0, 0, 0, 0.7);
    margin-top: 2px;
}

.grade-text h4 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.grade-text p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1.05rem;
}

.export-actions {
    display: flex;
    gap: 1.2rem;
}

.summary-stats-box {
    padding: 2.5rem;
    border-radius: 18px;
    height: 380px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.summary-stats-box h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-cyan);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.8rem;
}

.telemetry-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
    height: 100%;
}

.telemetry-list li {
    position: relative;
    padding-left: 1.2rem;
}

.telemetry-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-violet);
}

.telemetry-list li .time {
    color: var(--text-dim);
    margin-right: 0.5rem;
}

/* STORY PLAYER NAVIGATION BAR & CONTROLS */
.story-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 2.5rem;
    z-index: 50;
}

.btn-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.btn-control:hover:not(:disabled) {
    background: var(--text-primary);
    color: #000;
    border-color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.btn-control:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.btn-exit:hover {
    background: #ef4444 !important;
    color: #fff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
}

.slide-indicators {
    display: flex;
    gap: 0.8rem;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.indicator-dot.active {
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan-glow);
    width: 24px;
    border-radius: 100px;
}

.story-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.02);
    z-index: 50;
}

.story-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    header { padding: 1.5rem 2rem; }
    .slide-grid { gap: 3rem; }
    .stats-grid { gap: 1.5rem; }
    .repos-wrapper { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .repo-card { height: 220px; padding: 1.5rem; }
    .summary-grid { grid-template-columns: 1fr; gap: 3rem; overflow-y: auto; height: 100%; }
    .slide-item { padding: 6vh 6% 14vh; }
    .summary-stats-box { height: 260px; }
}

@media (max-width: 768px) {
    header { padding: 1.5rem 1.5rem; }
    .logo { font-size: 1.2rem; }
    .status-indicator { display: none; } /* Hide telemetry status on small mobile to save space */

    .view-section { padding: 0 1rem 2rem; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { margin-bottom: 2rem; }
    .input-panel { padding: 1.5rem; border-radius: 16px; }
    .input-group { flex-direction: column; }
    #usernameInput { padding: 1rem 1rem 1rem 3rem; font-size: 1rem; }
    .input-icon { left: 1.2rem; }
    .btn-glow-pulse { width: 100%; padding: 1rem; }
    
    .slides-wrapper { overflow: visible; }
    .slide-item { 
        padding: 2rem 1.5rem 140px; 
        overflow-y: auto; 
        -webkit-overflow-scrolling: touch;
        display: flex; 
        flex-direction: column;
        height: 100%; 
    }
    
    .slide-grid { 
        display: flex; 
        flex-direction: column; 
        gap: 2rem; 
        text-align: center; 
        align-items: center; 
        width: 100%;
    }
    .info-col { align-items: center; text-align: center; width: 100%; }
    .meta-row { display: flex; flex-wrap: wrap; gap: 1.5rem; width: 100%; justify-content: center; }
    .avatar-glow-ring { width: 140px; height: 140px; }
    
    .nebula-chart-container { width: 240px !important; height: 240px !important; margin: 0 auto; }
    .language-legend { width: 100%; max-width: 100%; }
    
    .stats-grid { display: flex; flex-direction: column; gap: 1rem; width: 100%; }
    .stat-card { padding: 1.5rem 1rem; width: 100%; }
    .stat-value { font-size: 2.5rem; }
    .repos-wrapper { display: flex; flex-direction: column; gap: 1rem; width: 100%; }
    .repo-card { height: auto; min-height: 180px; width: 100%; }
    
    .story-controls { 
        gap: 0.8rem; 
        bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px)); 
        width: 100%; 
        padding: 0 1rem;
        justify-content: center; 
        align-items: center;
        z-index: 100;
        left: 0;
        transform: none;
    }
    .btn-control { 
        width: 44px; 
        height: 44px; 
        font-size: 1rem;
    }
    .slide-indicators {
        gap: 0.5rem;
    }
    .indicator-dot {
        width: 6px;
        height: 6px;
    }
    .indicator-dot.active {
        width: 16px;
    }
    
    .summary-grid { 
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        width: 100%;
        text-align: center; 
        align-items: center;
    }
    .summary-details { 
        align-items: center; 
        width: 100%;
    }
    .summary-grade-box { 
        flex-direction: column; 
        gap: 1.5rem; 
        width: 100%;
        align-items: center;
        margin: 1.5rem 0 2rem;
    }
    .grade-text p {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 0 0.5rem;
    }
    .slide-title {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
        margin-bottom: 1.5rem;
        line-height: 1.3;
    }
    .btn-glow-pulse {
        font-size: 0.9rem;
        padding: 1rem 1.5rem;
        width: 100%;
        text-align: center;
    }
    .export-actions { 
        flex-direction: column; 
        width: 100%; 
        gap: 1rem;
    }
    .summary-stats-box { 
        height: auto; 
        padding: 1.5rem; 
        width: 100%;
    }
}

/* TOAST NOTIFICATION SYSTEM */
#toastContainer {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
    max-width: 340px;
    width: calc(100% - 4rem);
}

.toast {
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--accent-cyan);
    backdrop-filter: blur(15px);
    color: #fff;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    color: var(--accent-cyan);
    font-size: 1.4rem;
    margin-top: 0.1rem;
}

.toast-content h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toast-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

@media (max-width: 768px) {
    #toastContainer {
        top: 1.5rem;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: calc(100% - 2rem);
        max-width: 100%;
    }
}

/* STELLAR DUEL PROFILE COMPARISON STYLING */
.panel-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 1.2rem;
    margin-bottom: 1.8rem;
    justify-content: center;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(0, 255, 255, 0.25);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

#duelForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1.5rem;
}

.duel-inputs-wrapper {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
}

.duel-inputs-wrapper .input-wrapper {
    flex: 1;
}

.vs-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan-glow);
    font-style: italic;
}

/* Slide 1: VS Contenders Layout */
.duel-contenders-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    width: 100%;
    margin: 3rem 0;
}

.contender-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 200px;
    animation: contender-entrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.contender-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 1rem;
    color: #fff;
}

.contender-card.card-a { animation-delay: 0.2s; }
.contender-card.card-b { animation-delay: 0.4s; }

.contender-card.card-a .avatar-glow-ring {
    background: linear-gradient(135deg, #00d2ff, #00ffff);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.35);
    width: clamp(130px, 16vw, 180px);
    height: clamp(130px, 16vw, 180px);
    padding: 6px;
}

.contender-card.card-b .avatar-glow-ring {
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.35);
    width: clamp(130px, 16vw, 180px);
    height: clamp(130px, 16vw, 180px);
    padding: 6px;
}

.contender-username {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    margin-top: 0.2rem;
    opacity: 0.8;
}

.contender-card.card-b .contender-username {
    color: #d946ef;
}

.vs-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.vs-glow-text {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 900;
    font-style: italic;
    color: #ff3b30;
    text-shadow: 0 0 25px rgba(255, 59, 48, 0.7);
    animation: vs-flicker 2s infinite alternate;
}

.vs-energy-line {
    width: 2px;
    height: 120px;
    background: linear-gradient(180deg, transparent, #ff3b30, transparent);
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.4);
}

@keyframes contender-entrance {
    0% { transform: scale(0.8) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes vs-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; filter: hue-rotate(0deg); }
    20%, 24%, 55% { opacity: 0.5; filter: hue-rotate(90deg); }
}

/* Slide 2: Comparison Board Layout */
.comparison-board {
    width: 100%;
    max-width: 680px;
    padding: 2.5rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.comparison-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
}

.comp-metric-name {
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 2px;
    font-family: var(--font-mono);
    font-weight: 500;
}

.comp-val {
    font-size: 1.8rem;
    font-family: var(--font-display);
    text-shadow: 0 0 10px currentColor;
}

.comp-val.val-a { color: #00ffff; }
.comp-val.val-b { color: #8b5cf6; }

.comp-bar-wrapper {
    height: 6px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    display: flex;
    overflow: hidden;
    margin-top: 0.4rem;
}

.comp-bar-fill {
    height: 100%;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.comp-bar-fill.fill-a {
    background: linear-gradient(90deg, #00d2ff, #00ffff);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.comp-bar-fill.fill-b {
    background: linear-gradient(90deg, #8b5cf6, #d946ef);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* Slide 3: Language Match Layout */
.languages-battle-grid {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    align-items: center;
    gap: 2.5rem;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
}

.lang-pillar {
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-height: 250px;
    text-align: left;
}

.lang-pillar h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
}

.pillar-a h3 { color: #00ffff; }
.pillar-b h3 { color: #8b5cf6; }

.vs-sphere {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.3rem;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.25);
    justify-self: center;
}

.lang-battle-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.lang-battle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.lang-battle-name {
    color: #fff;
    font-weight: 500;
}

.lang-battle-pct {
    color: var(--text-secondary);
}

/* Slide 4: Verdict Resolution Layout */
.verdict-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3.5rem 2.5rem;
    text-align: center;
    max-width: 540px;
    margin: 0 auto;
}

.winner-crown {
    font-size: 3.2rem;
    color: #ffbc00;
    filter: drop-shadow(0 0 15px rgba(255, 188, 0, 0.5));
    margin-bottom: 1.8rem;
    animation: trophy-float 3s infinite ease-in-out;
}

.winner-announcement {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 0.8rem;
}

.verdict-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

@keyframes trophy-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

/* RESPONSIVE MOBILE OVERRIDES */
@media (max-width: 768px) {
    .duel-inputs-wrapper {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    .duel-inputs-wrapper .vs-text {
        margin: 0.2rem 0;
        font-size: 1rem;
    }
    .duel-contenders-row {
        flex-direction: column;
        gap: 2rem;
        margin: 1.5rem 0;
    }
    .vs-divider {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        align-items: center;
        gap: 1rem;
    }
    .vs-energy-line {
        height: 2px;
        width: 80px;
        background: linear-gradient(90deg, transparent, #ff3b30, transparent);
    }
    .vs-glow-text {
        font-size: 1.8rem;
        margin-bottom: 0.2rem;
    }
    .comparison-board {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    .comparison-row {
        font-size: 1rem;
    }
    .comp-val {
        font-size: 1.4rem;
    }
    .languages-battle-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .vs-sphere {
        display: none;
    }
    .lang-pillar {
        padding: 1.5rem;
        min-height: auto;
    }
    .verdict-box {
        padding: 2.2rem 1.5rem;
    }
    .winner-announcement {
        font-size: 1.8rem;
    }
}

/* MODAL OVERLAY AND CARD SYSTEM */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-card {
    position: relative;
    max-width: 500px;
    width: 100%;
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    animation: modal-slide-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.badge-preview-container {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.preview-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

#badgePreview {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    width: 100%;
}

#badgePreview img {
    max-width: 100%;
    height: auto;
}

@keyframes modal-slide-in {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

