:root {
    /* Apple Premium Palette - Dark Mode Primary */
    --apple-black: #050505;
    --apple-gray-900: #121214;
    --apple-gray-800: #1c1c1e;
    --apple-gray-700: #2c2c2e;
    --apple-blue: #0071e3;
    --apple-blue-rgb: 0, 113, 227;
    --apple-green: #30d158;
    --apple-red: #ff373f;
    --apple-orange: #ff9f0a;
    --apple-indigo: #5e5ce6;
    
    /* Functional Tokens */
    --primary-bg: var(--apple-black);
    --secondary-bg: var(--apple-gray-900);
    --card-bg: rgba(18, 18, 20, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(18, 18, 20, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.12);
    
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --text-tertiary: #636366;
    
    --accent-primary: var(--apple-blue);
    --accent-primary-rgb: var(--apple-blue-rgb);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Roboto Mono', 'Cascadia Code', Menlo, monospace;
    
    /* Shadows & Blurs */
    --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.4);
    --blur-standard: blur(20px);
    --blur-glass: blur(40px);
    
    --radius-section: 40px;
    --radius-card: 24px;
    --radius-button: 12px;

    /* Tool Specific Colors */
    --integrity-red: #ff373f;
    --comparison-orange: #ff9f0a;
    --metadata-indigo: #5e5ce6;
    --stego-purple: #bf5af2;
    --password-green: #30d158;
    --network-blue: #0a84ff;

    /* Mesh Gradient Tokens */
    --mesh-color-1: rgba(0, 113, 227, 0.4);
    --mesh-color-2: rgba(94, 92, 230, 0.3);
    --mesh-color-3: rgba(191, 90, 242, 0.2);
    --mesh-color-4: rgba(0, 0, 0, 0);
}

body.light-theme {
    --primary-bg: #f5f5f7;
    --secondary-bg: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.05);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #aeaeb2;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
}

* { 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* View State Logic */
.view-container {
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.view-hidden {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0; left: 0; right: 0;
    transform: scale(1.05);
    pointer-events: none;
}

/* Workflow Stepper */
.tool-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 0.5rem;
}

.tool-stepper::before {
    content: '';
    position: absolute;
    top: 50%; left: 1rem; right: 1rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.step-indicator {
    width: 24px;
    height: 24px;
    background: var(--apple-gray-700);
    border-radius: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-tertiary);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    border: 2px solid transparent;
}

.step-indicator.active {
    background: var(--tool-accent, var(--apple-blue));
    color: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(var(--tool-accent-rgb, var(--apple-blue-rgb)), 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.step-indicator.completed {
    background: var(--apple-green);
    color: #fff;
}

.step-content {
    display: none;
    animation: stepEnter 0.6s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.step-content.active {
    display: block;
}

@keyframes stepEnter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: slideInUp 0.8s cubic-bezier(0.19, 1, 0.22, 1) both;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Unique Tool Accents */
#integrity-card { --tool-accent: var(--integrity-red); --tool-accent-rgb: 255, 59, 48; }
#comparison-card { --tool-accent: var(--comparison-orange); --tool-accent-rgb: 255, 149, 0; }
#metadata-card { --tool-accent: var(--metadata-indigo); --tool-accent-rgb: 88, 86, 214; }
#stego-card { --tool-accent: var(--stego-purple); --tool-accent-rgb: 175, 82, 222; }
#password-card { --tool-accent: var(--password-green); --tool-accent-rgb: 52, 199, 89; }
#network-card { --tool-accent: var(--network-blue); --tool-accent-rgb: 0, 122, 255; }

html { 
    scroll-behavior: smooth;
    background-color: var(--primary-bg);
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    scrollbar-gutter: stable;
    scroll-padding-top: 80px; /* Adjust based on header height */
}

/* Custom Premium Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--apple-black);
}

::-webkit-scrollbar-thumb {
    background: var(--apple-gray-700);
    border-radius: 10px;
    border: 2px solid var(--apple-black);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--apple-blue);
}

body {
    background: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    overflow-x: hidden;
    transition: background-color 0.5s cubic-bezier(0.28, 0.11, 0.32, 1);
}

.container { 
    width: 100%; 
    max-width: 1440px; 
    margin: 0 auto; 
    padding: 1.5rem; 
}

.main-layout { 
    display: grid; 
    grid-template-columns: repeat(12, 1fr); 
    gap: 1.5rem; 
}

.tool-section { grid-column: 1 / -1; }
.sidebar-section { grid-column: 1 / -1; }

@media (min-width: 768px) {
    .tool-section { grid-column: span 8; }
    .sidebar-section { grid-column: span 4; }
}

@media (min-width: 1200px) {
    .tool-section { grid-column: span 9; }
    .sidebar-section { grid-column: span 3; }
}

.tool-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 1.5rem; 
}

/* Typography Enhancements */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}
@media (min-width: 768px) {
    .sidebar-section {
        grid-column: span 3;
        position: sticky;
        top: 2rem;
        align-self: start;
        height: auto;
        display: flex;
        flex-direction: column;
    }
    .sidebar-content-wrapper .tool-card + .tool-card {
        margin-top: 1.5rem;
    }
}
.tool-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
    /* Performance optimizations for butter-smooth scrolling */
    content-visibility: auto;
    contain-intrinsic-size: 1px 400px;
    transform: translateZ(0); /* Trigger GPU acceleration */
    backface-visibility: hidden;
    will-change: transform, opacity;
}

/* Ecosystem Section Styles */
.section.ecosystem {
    padding: 100px 0;
    background: var(--apple-black);
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.eyebrow {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--apple-blue);
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.ecosystem-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-card);
    padding: 2.5rem;
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.ecosystem-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(var(--apple-blue-rgb), 0.4);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.ecosystem-icon {
    width: 60px;
    height: 60px;
    background: rgba(var(--apple-blue-rgb), 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--apple-blue);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.ecosystem-card:hover .ecosystem-icon {
    background: var(--apple-blue);
    color: #fff;
    transform: scale(1.1);
}

.ecosystem-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.ecosystem-card-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.ecosystem-cta {
    font-weight: 600;
    color: var(--apple-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(var(--apple-blue-rgb), 0.1);
    border: 1px solid rgba(var(--apple-blue-rgb), 0.2);
    border-radius: 99px;
    color: var(--apple-blue);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tool-help-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--tool-accent, var(--apple-blue));
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.tool-help-btn:hover {
    background: var(--apple-blue);
    color: #fff;
    transform: scale(1.1);
}

.tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.tool-card-header h2 {
    margin-bottom: 0 !important;
}

.tool-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--tool-accent-rgb, var(--apple-blue-rgb)), 0.4);
    background: rgba(30, 30, 32, 0.8);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
}

.tool-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.tool-card h2 i {
    color: var(--apple-blue);
    font-size: 1.3rem;
    filter: drop-shadow(0 0 8px rgba(var(--apple-blue-rgb), 0.4));
}

.tool-card .input-group {
    margin-bottom: 1.25rem;
}

.tool-card label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

input[type="file"],
input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-button);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--apple-blue);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(var(--apple-blue-rgb), 0.1);
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--radius-button);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    font-family: var(--font-sans);
}

button[data-action*="run"], .btn-primary {
    background: var(--apple-blue);
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--apple-blue-rgb), 0.3);
}

button[data-action*="run"]:hover, .btn-primary:hover {
    background: #0071e3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--apple-blue-rgb), 0.4);
}

button[data-action*="run"]:active, .btn-primary:active {
    transform: translateY(0);
}

button.secondary, .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

button.secondary:hover, .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.output {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
}

.header {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.nav-project-links {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.nav-project-pill {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #dfe9ff;
    text-decoration: none;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.nav-project-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}
.nav-social-row {
    display: flex;
    gap: 0.35rem;
    margin-left: 0.5rem;
}
.nav-social {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
    color: #dbe9ff;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.nav-social:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.1); }

.logo-container {
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.logo-container:hover {
    transform: scale(1.02);
}

.section.hero {
    position: relative;
    min-height: 70vh; /* Further reduced from 85vh */
    padding: 60px 0 40px; /* Further reduced padding */
    background: var(--apple-black);
    color: #fff;
    text-align: center;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-mesh-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(at 0% 0%, var(--mesh-color-1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, var(--mesh-color-2) 0px, transparent 50%),
        radial-gradient(at 100% 100%, var(--mesh-color-3) 0px, transparent 50%),
        radial-gradient(at 0% 100%, var(--mesh-color-4) 0px, transparent 50%);
    filter: blur(80px);
    opacity: 0.6;
    animation: meshFlow 20s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

@keyframes meshFlow {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.section.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--apple-black) 100%);
    pointer-events: none;
    z-index: 0;
}

@keyframes drift {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    animation: heroEntrance 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes heroEntrance {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-title {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 0.5rem;
    background: linear-gradient(180deg, #fff 0%, #a1a1a6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-full-form {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--apple-blue);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.hero-cta .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 980px; /* Apple pill button */
}

.btn-primary {
    background: #fff;
    color: #000;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}
.tool-card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--accent-primary-rgb), 0.3);
}
.sidebar-section .tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(255, 255, 255, 0.2);
}
.sidebar-section .tool-card:hover::before {
    opacity: 1;
}
.tool-card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; position: relative; z-index: 2; }
.tool-card h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.tool-card h2 i { 
    color: var(--accent-primary); 
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@media (hover: hover) {
    .tool-card:hover h2 i {
        transform: rotate(360deg) scale(1.2);
    }
}

.card-loader {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 16, 33, 0.8); backdrop-filter: blur(4px);
    display: none; flex-direction: column; justify-content: center; align-items: center; z-index: 10;
}
.card-loader.active { display: flex; }
.card-loader span { margin-top: 1rem; font-family: var(--font-mono); }

.progress-bar {
    width: 80%;
    background-color: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    margin-top: 1rem;
    overflow: hidden;
}
.progress-bar-inner { width: 0%; height: 100%; background-color: var(--accent-primary); border-radius: 4px; transition: width 0.2s ease-out; }
.input-group { 
    margin-bottom: 1rem; 
    border: 2px dashed transparent; 
    border-radius: 0.75rem; 
    transition: all 0.2s ease; 
    padding: 0.5rem;
}
.input-group.drag-over {
    border-color: var(--accent-primary);
    background-color: rgba(var(--accent-primary-rgb), 0.05);
}
.input-group:focus-within {
    border-color: var(--accent-primary);
    background-color: rgba(var(--accent-primary-rgb), 0.05);
    box-shadow: 0 0 10px rgba(var(--accent-primary-rgb), 0.15);
}
label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }
input, select, textarea { width: 100%; padding: 0.75rem 1rem; background: var(--primary-bg); border: 1px solid var(--border-color); border-radius: 0.5rem; color: var(--text-primary); font-size: 0.9rem; transition: border-color 0.2s, box-shadow 0.2s; font-family: var(--font-sans); }
textarea { resize: vertical; min-height: 100px; font-family: var(--font-mono); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15); }
input:disabled, button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
button { 
    --btnGlow: 0 0 16px rgba(106,227,255,0.6);
    padding: 0.75rem 1.25rem; border-radius: 0.75rem; border: 1px solid rgba(255,255,255,0.12);
    background:radial-gradient(120% 120% at 20% 20%, rgba(106,227,255,0.35), transparent 40%),
             linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border-color:rgba(106,227,255,0.35);
    box-shadow:var(--btnGlow);
    color: var(--text-primary); cursor: pointer; font-weight: 600; font-size: 0.9rem; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.5rem; 
}
.btn-group button:not(.secondary) { flex: 1 1 auto; min-width: 120px; }
.btn-group button.secondary { flex: 0 1 auto; }
button:not(:disabled):hover { box-shadow: var(--btnGlow), var(--shadow-lg); transform: translateY(-3px); }
button:not(:disabled):active {
    transform: translateY(0px) scale(0.98);
    filter: brightness(0.9);
}
button.secondary { background: rgba(var(--accent-primary-rgb), 0.1); color: var(--accent-primary); }
button.secondary:not(:disabled):hover { background: rgba(var(--accent-primary-rgb), 0.2); }
button.danger-btn { background: var(--danger); color: white; }
button.danger-btn:not(:disabled):hover { background: #c0392b; filter: brightness(1.1); }
.loading-spinner { width: 1.5em; height: 1.5em; border: 3px solid var(--accent-primary); border-right-color: transparent; border-radius: 50%; animation: spin 3s linear infinite; }

.output { background: var(--secondary-bg); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 1rem; margin-top: 1.5rem; min-height: 80px; font-family: var(--font-mono); white-space: pre-wrap; word-wrap: break-word; color: var(--text-secondary); font-size: 0.85rem; line-height: 1.8; flex-grow: 1; overflow-x: auto; }
.output:empty { display: none; }
.output details { margin-top: 0.5rem; background: rgba(0,0,0,0.2); padding: 0.5rem; border-radius: 0.25rem; }
.output summary { cursor: pointer; color: var(--accent-secondary); }
.output .copy-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 0.5rem;
    font-size: 0.9em;
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s, transform 0.2s;
    vertical-align: middle;
}
.output .copy-btn:hover {
    opacity: 1;
    color: var(--accent-primary);
    transform: scale(1.1);
}
.output .copy-btn:disabled {
    color: var(--success);
    opacity: 1;
    cursor: default;
    transform: none;
}
.output .copy-btn i { pointer-events: none; }
.show-more-link { color: var(--accent-secondary); cursor: pointer; text-decoration: underline; font-style: italic; }
.interpretation { font-style: italic; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border-color); color: var(--text-primary); font-size: 0.9rem; }
.interpretation ul { padding-left: 1.5rem; margin-top: 0.5rem; }
.interpretation li { margin-bottom: 0.5rem; }

.hex-viewer { font-size: 0.8rem; line-height: 1.6; }
.hex-viewer .row { display: flex; }
.hex-viewer .hex-offset { color: var(--accent-secondary); width: 80px; flex-shrink: 0; }
.hex-viewer .hex-byte { width: 2.5ch; text-align: center; }
.hex-viewer .hex-ascii { letter-spacing: 2px; }
#comparison-output, #password-output {
    white-space: normal;
    font-family: var(--font-sans);
}
.hex-viewer .diff { background-color: rgba(239, 68, 68, 0.3); color: var(--danger); border-radius: 2px; font-weight: bold; }
.strength-bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.strength-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}
.chat-container { display: flex; flex-direction: column; height: 100%; max-height: 400px; flex-grow: 1; }
.chat-window { flex-grow: 1; overflow-y: auto; padding: 0.5rem; }
.chat-message { margin-bottom: 0.75rem; padding: 0.65rem 1rem; border-radius: 1rem; max-width: 90%; line-height: 1.5; font-size: 0.9rem; }
.user-message { background: var(--accent-primary); color: white; margin-left: auto; border-bottom-right-radius: 0.25rem; }
.ai-message { background: var(--secondary-bg); color: var(--text-primary); margin-right: auto; border-bottom-left-radius: 0.25rem; }
.ai-message ul { padding-left: 1.5rem; margin-top: 0.5rem; }

.chat-input-area { display: flex; gap: 0.5rem; margin-top: 1rem; }
.ai-quick-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }
.ai-quick-actions button { padding: 0.25rem 0.75rem; font-size: 0.75rem; flex: 0; }

.success { color: var(--success); } .warning { color: var(--warning); } .danger { color: var(--danger); } .info { color: var(--accent-secondary); }

/* --- Interactive Chain of Custody Log --- */
.coc-container {
    position: relative;
    padding-left: 25px; /* Space for the timeline line and dots */
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}
.coc-container::-webkit-scrollbar { width: 4px; }
.coc-container::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }
.coc-container::before { /* The timeline vertical line */
    content: '';
    position: absolute;
    left: 10px;
    top: 15px;
    bottom: 15px;
    width: 2px;
    background-color: var(--border-color);
    border-radius: 1px;
}
.coc-entry {
    position: relative;
    padding: 0.5rem 0 0.5rem 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}
.coc-entry:hover { background-color: rgba(var(--accent-primary-rgb), 0.1); }
.coc-status { position: absolute; left: -21px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--secondary-bg); }
.status-high { background: var(--danger); } .status-medium { background: var(--warning); } .status-low { background: var(--success); }
.coc-info .coc-action { font-weight: 500; color: var(--text-primary); font-size: 0.9rem; display: block; }
.coc-info .coc-meta { font-size: 0.8rem; color: var(--text-secondary); display: block; margin-top: 2px; }
.coc-info .coc-target { font-size: 0.8rem; color: var(--text-secondary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.timeline-container {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid var(--border-color);
}
.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}
.timeline-item:last-child {
    margin-bottom: 0;
}
.timeline-dot {
    position: absolute;
    left: -43px;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 3px solid var(--secondary-bg);
}
.timeline-dot.status-high { background-color: var(--danger); }
.timeline-dot.status-medium { background-color: var(--warning); }
.timeline-dot.status-low { background-color: var(--success); }

.timeline-dot i { font-size: 0.8rem; }
.timeline-content { background: rgba(var(--accent-primary-rgb), 0.05); padding: 1rem; border-radius: 0.5rem; border: 1px solid var(--border-color); cursor: pointer; transition: background-color 0.2s, transform 0.2s; }
.timeline-content:hover { background-color: rgba(var(--accent-primary-rgb), 0.1); transform: translateX(5px); }
.timeline-content h4 { margin: 0 0 0.25rem 0; font-size: 1.1rem; color: var(--text-primary); }
.timeline-content .time { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.timeline-content p { margin: 0; font-size: 0.9rem; }

.navigator-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.navigator-list li {
    margin-bottom: 0.75rem;
}

.navigator-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-button);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.navigator-list a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.navigator-list a.active {
    color: #fff;
    background: rgba(var(--apple-blue-rgb), 0.15);
    border-color: rgba(var(--apple-blue-rgb), 0.3);
    font-weight: 600;
}
.navigator-list li:last-child {
    margin-bottom: 0;
}
.navigator-list a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    font-weight: 500;
}
.navigator-list a:hover {
    background-color: rgba(var(--accent-primary-rgb), 0.1);
    color: var(--text-primary);
    transform: translateX(5px);
}
.navigator-list a.active {
    background-color: rgba(var(--accent-primary-rgb), 0.15);
    color: var(--text-primary);
    font-weight: 600;
    transform: translateX(5px);
}
.navigator-list a i {
    color: var(--accent-primary);
    width: 20px;
    text-align: center;
}

.tool-section.single-view .tool-grid {
    display: flex;
    justify-content: center;
    position: relative; /* Required for height animation */
    transition: height 0.3s ease-in-out;
}
.tool-section.single-view .tool-card {
    display: none; /* Hide all cards by default in single view */
    width: 100%;
    max-width: 750px; /* Prevent card from becoming too wide */
    flex-shrink: 0;
}
.tool-section.single-view .tool-card.active-tool {
    display: flex; /* Show only the active one */
    animation: fadeIn 0.4s ease-out forwards;
    transform: none !important; /* Override hover effects for a stable view */
}
.tool-section.single-view .tool-card.active-tool:hover {
    transform: none !important; /* Disable hover transform in single view */
    box-shadow: var(--shadow-md);
}

.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s 0s;
}
.modal-content { background: var(--secondary-bg); border-radius: 1rem; padding: 2rem; max-width: 800px; width: 90%; max-height: 80vh; overflow-y: auto; box-shadow: var(--shadow-lg); border: 1px solid var(--border-color); position: relative; transition: transform 0.3s ease-out, opacity 0.3s ease-out; transform: scale(0.95); opacity: 0; }
.modal-overlay.active .modal-content { transform: scale(1); opacity: 1; }
.modal-body { white-space: pre-wrap; font-family: var(--font-mono); word-wrap: break-word; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; }

.toggle-switch { display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; }
.toggle-switch label { margin-bottom: 0; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--secondary-bg); transition: .4s; border-radius: 28px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-primary); }
input:checked + .slider:before { transform: translateX(22px); }

.credits-card p { font-size: 0.9rem; color: var(--text-secondary); }
.credits-card strong { color: var(--text-primary); font-weight: 500; }

/* --- Styles for the Redesigned Network Analyzer --- */
#network-output {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1.5rem;
    min-height: 80px;
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-secondary);
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: normal; /* This is the key fix: ensure it's not pre-wrap */
}
#network-output:empty::before {
    content: 'Paste logs and click "Advanced Analysis".';
    font-style: italic;
}
.network-summary { display: flex; justify-content: space-around; text-align: center; background: rgba(0,0,0,0.1); padding: 0.75rem; border-radius: 0.5rem; margin-bottom: 1.5rem; }
body.light-theme .network-summary { background: rgba(0,0,0,0.03); }
.network-summary > div { display: flex; flex-direction: column; }
.network-summary span:first-child { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.threat-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; table-layout: fixed; }
.threat-table th, .threat-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.threat-table th { font-weight: 600; color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.threat-table td { vertical-align: top; font-size: 0.9rem; }
.threat-table .threat-details-cell { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-secondary); word-break: break-word; }
.threat-table strong { color: var(--text-primary); }
.threat-table small { color: var(--text-secondary); font-size: 0.8rem; }
.threat-table th:nth-child(1) { width: 15%; }
.threat-table th:nth-child(2) { width: 25%; }
.threat-table th:nth-child(3) { width: 60%; }
/* --- NEW: Single View Mode & Navigators --- */
.tool-navigator {
    background: var(--secondary-bg);
    border-radius: 1rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease-out;
}
.tool-navigator .navigator-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
}
.tool-navigator .navigator-list a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}
.tool-navigator .navigator-list a:hover {
    background-color: rgba(var(--accent-primary-rgb), 0.1);
    color: var(--text-primary);
}
.tool-navigator .navigator-list a.active {
    background-color: var(--accent-primary);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-md);
}
.tool-navigator .navigator-list a:active {
    transform: scale(0.95);
    background-color: #0077b3;
}

#single-view-toggle-btn {
    flex-shrink: 0;
    padding: 0.5rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 0.9rem;
    line-height: 1;
    margin: 0;
}
#single-view-toggle-btn.active {
    background: var(--accent-primary);
    color: var(--text-primary);
}
/* --- NEW: Sidebar Interactivity Enhancements --- */
@media (min-width: 1280px) {
    /* Sidebar layout is now defined in the main responsive block for clarity */
    .sidebar-content-wrapper {
        overflow-y: auto;
        flex-grow: 1;
        padding-right: 10px; /* space for scrollbar */
        margin-right: -10px; /* hide the space if no scrollbar */
        scroll-padding-top: 1rem; /* Prevent content from hiding under sticky nav */
    }
    /* Custom scrollbar for sidebar */
    .sidebar-content-wrapper::-webkit-scrollbar { width: 6px; }
    .sidebar-content-wrapper::-webkit-scrollbar-track { background: transparent; }
    .sidebar-content-wrapper::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
    .sidebar-content-wrapper::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }
}

.sidebar-navigator {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    background: var(--primary-bg);
    z-index: 5;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.sidebar-navigator .navigator-list {
    display: flex;
    flex-grow: 1;
    justify-content: space-between;
    gap: 0.5rem;
}
.sidebar-navigator .navigator-list a {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
}
.sidebar-navigator .navigator-list a:hover {
    transform: translateY(-2px);
}
.sidebar-navigator .navigator-list a.active {
    color: var(--text-primary);
    transform: translateY(-2px);
    background-color: rgba(var(--accent-primary-rgb), 0.1);
}
.sidebar-navigator .navigator-list a i { font-size: 1.2rem; margin-bottom: 0.25rem; }
/* --- NEW: UI/UX Polish --- */
#metadata-output {
    white-space: normal;
    font-family: var(--font-sans);
    line-height: 1.6;
    padding: 0;
    background: transparent;
    border: none;
}
.key-findings-box {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
body.light-theme .key-findings-box { background: #F3F4F6; }
.key-findings-box h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.key-finding-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(var(--accent-primary-rgb), 0.1);
}
body.light-theme .key-finding-item { border-bottom-color: #E5E7EB; }
.key-finding-item:last-child { border-bottom: none; }
.key-finding-item .key {
    font-weight: 500;
    color: var(--text-secondary);
}
.key-finding-item .value {
    color: var(--text-primary);
    word-break: break-all;
}

/* --- NEW: Accessibility Improvement for Animations --- */
body.no-animations h1.acronym::before,
body.no-animations h1.acronym::after {
    display: none;
}
body.no-animations {
    cursor: auto;
}
/* --- NEW: Professional UI Polish & Readability --- */
#password-output:not(:empty) {
    padding: 0;
    background: transparent;
    border: none;
}
.password-audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: center;
}
.audit-metric {
    background: var(--secondary-bg);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}
.audit-metric .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}
.audit-metric .value {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-mono);
}
.password-recommendations {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.password-recommendations h4 { font-size: 1rem; margin-bottom: 0.75rem; }
.password-recommendations ul { list-style: none; padding: 0; }
.password-recommendations li { background: rgba(245, 158, 11, 0.1); padding: 0.5rem 1rem; border-radius: 0.5rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
.password-recommendations li::before { content: '\f071'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--warning); }
.password-recommendations li.good-practice { background: rgba(16, 185, 129, 0.1); }
.password-recommendations li.good-practice::before { content: '\f058'; color: var(--success); }

#comparison-output:not(:empty) {
    padding: 0;
    background: transparent;
    border: none;
}
.comparison-summary {
    padding: 1rem; border-radius: 0.75rem; margin-bottom: 1.5rem; font-size: 1.1rem; font-weight: 600; text-align: center;
}
.summary-identical { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid var(--success); }
.summary-different { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid var(--danger); }
.comparison-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: fixed;
}
.comparison-results-table th, .comparison-results-table td {
    padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border-color); vertical-align: middle;
}
.comparison-results-table th {
    font-weight: 500; color: var(--text-secondary); width: 80px;
}
.comparison-results-table td {
    font-family: var(--font-mono); font-size: 0.85rem; word-break: break-all;
}
.comparison-results-table .file-header {
    font-family: var(--font-sans); font-weight: 600; font-size: 0.9rem; color: var(--text-primary); padding-bottom: 1rem;
}
#comparison-output .interpretation {
    margin-top: 1rem; padding: 1rem; border-radius: 0.5rem; background: var(--secondary-bg); border: 1px solid var(--border-color);
}
/* --- NEW: AI First Look Feature --- */
.ai-first-look {
    display: none; /* Hidden by default */
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.1), rgba(var(--accent-secondary-rgb), 0.1));
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-secondary);
    border-radius: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    animation: fadeIn 0.5s ease-out;
}
.ai-first-look .ai-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}
.ai-first-look .ai-header i { animation: pulse 2s infinite; }
.ai-first-look .ai-content { color: var(--text-primary); }
.ai-first-look .loading-text { font-style: italic; }
/* --- NEW: Toast Notifications --- */
#toast-container {
    position: fixed;
    top: 5.5rem; /* Positioned below the brand mark on the right */
    right: 1.5rem;
    z-index: 1002; /* Above brand mark and help button */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.toast {
    background: var(--secondary-bg);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInToast 0.5s forwards, fadeOutToast 0.5s 4.5s forwards;
}
.toast.toast-success { border-left-color: var(--success); }
.guide-container { display: flex; flex-direction: column; margin-top: 1.5rem; }
.guide-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.75rem; margin-bottom: 1.5rem; }
.guide-tab-btn { padding: 0.75rem 1.25rem; font-size: 0.9rem; font-weight: 600; background: transparent; color: var(--text-secondary); border: none; border-bottom: 3px solid transparent; cursor: pointer; transition: all 0.2s ease; margin-bottom: -2px; }
.guide-tab-btn:hover { background: rgba(var(--accent-primary-rgb), 0.1); color: var(--text-primary); }
.guide-tab-btn.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }
.guide-tab-content { display: none; animation: fadeIn 0.4s ease-out; }
.guide-tab-content.active { display: block; }
.guide-tab-content h4 { font-size: 1.2rem; color: var(--accent-primary); margin-top: 1rem; margin-bottom: 0.5rem; }
.guide-tab-content p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 1rem; }
.guide-tab-content ul { list-style: none; padding-left: 0; }
.guide-tab-content > ul > li { position: relative; padding-left: 25px; margin-bottom: 1rem; }
.guide-tab-content > ul > li::before { content: '\f105'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: 4px; color: var(--accent-secondary); }
.guide-tab-content ul ul { list-style: none; padding-left: 20px; margin-top: 0.5rem; }
.guide-tab-content ul ul li { position: relative; padding-left: 20px; margin-bottom: 0.5rem; }
.guide-tab-content ul ul li::before { content: '\2023'; position: absolute; left: 0; top: 0; color: var(--text-secondary); }

/* --- NEW: Animation for Guide's "Highlight" feature --- */
@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-primary-rgb), 0.7); transform: scale(1); }
    70% { box-shadow: 0 0 0 20px rgba(var(--accent-primary-rgb), 0); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-primary-rgb), 0); transform: scale(1); }
}
.tool-card.highlight-pulse {
    animation: highlight-pulse 1.5s ease-out;
}
/* --- NEW: Mobile Responsiveness & Fit --- */
/* Mobile Responsiveness */
@media (max-width: 834px) {
    .hero-title { font-size: 3.5rem; }
    .hero-cta { flex-direction: column; align-items: stretch; max-width: 320px; margin: 0 auto; }
}

/* Sidebar & Tool Navigation */
.sidebar-navigator, .tool-navigator {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    display: flex;
}

.navigator-list {
    display: flex;
    list-style: none;
    width: 100%;
    gap: 0.25rem;
}

.navigator-list li {
    flex: 1;
}

.navigator-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.navigator-list a i {
    font-size: 1rem;
}

.navigator-list a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

body:not(.light-theme) .navigator-list a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.navigator-list a.active {
    background: var(--card-bg);
    color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

/* Responsive Overrides */
@media (max-width: 767px) {
    .container { padding: 1rem; }
    .hero-title { font-size: 2.5rem; }
    .main-layout { display: flex; flex-direction: column; }
    .tool-grid { grid-template-columns: 1fr; }
    .sidebar-section { order: -1; }
}
/* --- NEW: Top Right Brand Mark --- */
@keyframes brand-mark-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(var(--accent-primary-rgb), 0.4);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 16px rgba(var(--accent-primary-rgb), 0.6);
    }
}
@keyframes brand-mark-border-spin {
    to {
        transform: rotate(360deg);
    }
}
@keyframes brand-mark-scanner-sweep {
    to {
        transform: rotate(360deg);
    }
}

#brand-mark {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem; /* MOVED to the right */
    z-index: 1001;
    width: 60px;
    height: 60px;
    /* Styles for the container: positioning, background, blur */
    background: rgba(var(--accent-primary-rgb), 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    /* NEW: Add perspective to the container for 3D effects */
    perspective: 800px;
}

/* NEW: Inner element to handle 3D transforms separately from the blurred background */
.brand-mark-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d; /* This is the key for 3D effect */
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1); /* Smoother return transition */
    animation: brand-mark-pulse 4s infinite ease-in-out;
    will-change: transform;
    overflow: hidden; /* For the new glint effect */
    border-radius: 50%; /* Ensure inner element is also round for consistency */
    position: relative; /* Keep for pseudo-elements */
}

/* NEW: Styles for the SVG logo */
.brand-mark-svg {
    width: 90%;
    height: 90%;
    overflow: visible; /* Allows glow/shadow to extend beyond the viewbox */
    /* The new SVG has its own internal glow filter, so the CSS filter is removed to prevent conflicts. */
    transition: filter 0.3s ease;
}

#brand-mark:hover {
    background: rgba(var(--accent-primary-rgb), 0.25);
    box-shadow: 0 0 35px rgba(var(--accent-primary-rgb), 0.9); /* MORE DRAMATIC: Increased glow */
}

/* NEW: Target the inner element on hover */
#brand-mark:hover .brand-mark-inner {
    animation-play-state: paused; /* Stop the main pulse on hover */
    /* NEW: Add a more dramatic 3D tilt on hover */
    transform: rotateX(15deg) rotateY(-15deg) scale(1.1);
}

/* --- NEW: Animated "Tech" Border --- */
/* MOVED: Now a pseudo-element of the inner div */
.brand-mark-inner::before {
    content: '';
    position: absolute;
    inset: -5px; /* Position it outside the main circle */
    border-radius: 50%;
    border: 2px solid transparent;
    /* Create a border with a gap using a conic gradient */
    border-top-color: var(--accent-secondary);
    border-right-color: var(--accent-secondary);
    border-bottom-color: var(--accent-secondary);
    /* The rotation creates the spinning effect */
    animation: brand-mark-border-spin 2s linear infinite;
    /* Add glowing "pincers" at the ends of the border gap */
    box-shadow: 0 0 10px 2px rgba(var(--accent-secondary-rgb), 0.5),
                inset 0 0 10px 2px rgba(var(--accent-secondary-rgb), 0.5);
    transform: translateZ(10px); /* Adjusted depth */
}

/* MOVED: Target the inner element's pseudo-element on hover */
#brand-mark:hover .brand-mark-inner::before {
    /* Pause the border spin and make it glow brighter on hover */
    animation-play-state: paused;
    box-shadow: 0 0 20px 4px var(--accent-secondary),
                inset 0 0 20px 4px var(--accent-secondary); /* MORE DRAMATIC: Brighter border glow */
}

/* --- NEW: Animated "Radar" Background for Brand Mark --- */
/* MOVED: Now a pseudo-element of the inner div */
.brand-mark-inner::after {
    content: '';
    position: absolute;
    inset: -12px; /* Position it behind the border */
    border-radius: 50%;
    background-image: /* The sweeping line */
        conic-gradient(
            from 0deg,
            transparent 0%,
            transparent 85%,
            var(--accent-secondary) 98%,
            transparent 100%
        );
    background-size: 100% 100%;
    z-index: -1; /* Place it behind the main element */
    opacity: 0.7;
    animation: brand-mark-scanner-sweep 5s linear infinite;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateZ(-15px); /* Adjusted depth */
}
/* MOVED: Target the inner element's pseudo-element on hover */
#brand-mark:hover .brand-mark-inner::after {
    opacity: 1;
    transform: scale(1.2) translateZ(-15px); /* Adjusted depth */
    animation-duration: 2.5s; /* Speed up the sweep on hover */
}

/* NEW: Interactive Glint/Shine Effect */
.brand-mark-glint {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-110%) skewX(-30deg);
    transition: transform 0.4s ease-out; /* Smoother glint transition */
    pointer-events: none;
    z-index: 2;
    opacity: 0.8;
    mix-blend-mode: color-dodge;
}
/* --- NEW: Futuristic UI Enhancements --- */
@keyframes glitch-skew {
    0% { transform: skewX(0deg); }
    5% { transform: skewX(1deg); }
    10% { transform: skewX(-1deg); }
    15% { transform: skewX(0deg); }
    100% { transform: skewX(0deg); }
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(45% 0 50% 0); } 5% { clip-path: inset(5% 0 80% 0); }
    10% { clip-path: inset(90% 0 2% 0); } 15% { clip-path: inset(40% 0 45% 0); }
    20% { clip-path: inset(80% 0 5% 0); } 25% { clip-path: inset(20% 0 75% 0); }
    30% { clip-path: inset(95% 0 2% 0); } 35% { clip-path: inset(5% 0 90% 0); }
    40% { clip-path: inset(30% 0 60% 0); } 45% { clip-path: inset(70% 0 10% 0); }
    50% { clip-path: inset(90% 0 5% 0); } 55% { clip-path: inset(10% 0 85% 0); }
    60% { clip-path: inset(40% 0 50% 0); } 65% { clip-path: inset(85% 0 5% 0); }
    70% { clip-path: inset(25% 0 70% 0); } 75% { clip-path: inset(90% 0 8% 0); }
    80% { clip-path: inset(15% 0 80% 0); } 85% { clip-path: inset(50% 0 40% 0); }
    90% { clip-path: inset(75% 0 5% 0); } 95% { clip-path: inset(20% 0 80% 0); }
    100% { clip-path: inset(95% 0 2% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(80% 0 5% 0); } 5% { clip-path: inset(20% 0 75% 0); }
    10% { clip-path: inset(5% 0 90% 0); } 15% { clip-path: inset(70% 0 10% 0); }
    20% { clip-path: inset(90% 0 5% 0); } 25% { clip-path: inset(40% 0 50% 0); }
    30% { clip-path: inset(15% 0 80% 0); } 35% { clip-path: inset(75% 0 5% 0); }
    40% { clip-path: inset(95% 0 2% 0); } 45% { clip-path: inset(30% 0 60% 0); }
    50% { clip-path: inset(10% 0 85% 0); } 55% { clip-path: inset(85% 0 5% 0); }
    60% { clip-path: inset(25% 0 70% 0); } 65% { clip-path: inset(50% 0 40% 0); }
    70% { clip-path: inset(90% 0 8% 0); } 75% { clip-path: inset(5% 0 80% 0); }
    80% { clip-path: inset(40% 0 45% 0); } 85% { clip-path: inset(90% 0 2% 0); }
    90% { clip-path: inset(5% 0 80% 0); } 95% { clip-path: inset(80% 0 5% 0); }
    100% { clip-path: inset(45% 0 50% 0); }
}

.glitch-name {
    position: relative;
    color: var(--accent-secondary);
    text-shadow: 0 0 5px var(--accent-secondary);
    animation: glitch-skew 5s infinite linear;
    font-weight: 700 !important; /* Override strong tag */
}

.glitch-name::before,
.glitch-name::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    overflow: hidden;
}

.glitch-name::before {
    left: 2px;
    text-shadow: -2px 0 var(--danger);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch-name::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-primary);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes credits-border-pan { to { background-position: 200% center; } }

/* NEW: Animation for the creator card background */
@keyframes slow-gradient-pan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* NEW: Animation for the creator avatar */
@keyframes avatar-pulse {
    0% { box-shadow: 0 0 15px rgba(var(--accent-primary-rgb), 0.3), 0 0 5px rgba(var(--accent-secondary-rgb), 0.2); }
    50% { box-shadow: 0 0 25px rgba(var(--accent-primary-rgb), 0.5), 0 0 10px rgba(var(--accent-secondary-rgb), 0.3); }
    100% { box-shadow: 0 0 15px rgba(var(--accent-primary-rgb), 0.3), 0 0 5px rgba(var(--accent-secondary-rgb), 0.2); }
}

/* --- NEW: Top Right Creator Info Popout --- */
/* --- NEW: Top Right Creator Info Popout (Apple-Style) --- */
#creator-popout {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2000;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

#creator-popout:hover {
    width: 380px;
    height: 200px;
    border-radius: 32px;
    padding: 1.25rem;
    background: rgba(10, 10, 12, 0.9);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

#creator-popout::before {
    content: '\f007';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 22px;
    left: 22px;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    color: var(--apple-blue);
    transition: all 0.4s ease;
    z-index: 5;
}

#creator-popout:hover::before {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
}

.creator-popout-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    transform: scale(0.96);
    transition: all 0.5s 0.1s cubic-bezier(0.16, 1, 0.3, 1);
    visibility: hidden;
}

#creator-popout:hover .creator-popout-content {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}

.creator-profile {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    align-items: center;
    flex: 1;
}

.creator-avatar {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--apple-blue), #5e5ce6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 113, 227, 0.25);
}

.creator-info h4 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.15rem;
    letter-spacing: -0.02em;
}

.creator-role {
    font-size: 0.82rem;
    color: var(--apple-blue);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    display: block;
}

.creator-university, .creator-education {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
    margin: 0;
}

.creator-socials {
    display: flex;
    gap: 0.8rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.social-link {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-link:hover {
    background: var(--apple-blue);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Fix for smooth view transitions */
#landing-view, #lab-view {
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
}
/* --- Detailed Info Section --- */
.detailed-info-section {
    /* UPDATED: Added animated gradient background */
    background:
        radial-gradient(800px 500px at 0% 100%, rgba(var(--accent-secondary-rgb), 0.08), transparent 40%),
        radial-gradient(900px 600px at 100% 0%, rgba(var(--accent-primary-rgb), 0.08), transparent 50%),
        var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    padding: 4rem 1rem;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

.detailed-info-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}
.detailed-info-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
/* NEW: Gradient heading for the section title */
.detailed-info-section .gradient-heading {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(var(--accent-primary-rgb), 0.3);
}
.detailed-info-section .intro-paragraph {
    font-size: 1.125rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 800px;
}
/* Detailed Information Section */
.detailed-info-section {
    padding: 5rem 1.5rem;
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
}

.detailed-info-section h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
    color: var(--primary-blue);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-list li {
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-list li:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-list i {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    display: block;
}

.feature-list h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-list p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Loader Styles */
.loader {
    position: fixed;
    inset: 0;
    background: var(--primary-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader__orb {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 103, 184, 0.1);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader__text {
    margin-top: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* Footer Section */
.footer {
    padding: 3rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--secondary-bg);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer a {
    color: var(--primary-blue);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ===== 2026 Interface Refresh Layer (non-breaking overrides) ===== */
:root {
    --border-color: rgba(255, 255, 255, 0.14);
    --primary-blue: #1e7bff;
    --accent-secondary: #19d2c8;
    --accent-secondary-rgb: 25, 210, 200;
    --radius-sm: 10px;
    --radius-md: 16px;
    --shadow-lg: 0 24px 50px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.28);
    --success: #42d66b;
    --warning: #ffb649;
    --danger: #ff5d5d;
    --font-heading: "Plus Jakarta Sans", "Inter", sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    background: #05070a;
    position: relative;
    overflow-x: hidden;
}

/* Billion-Dollar Fluid Mesh Background */
body::before, body::after {
    content: "";
    position: fixed;
    width: 150vmax;
    height: 150vmax;
    top: -25vmax;
    left: -25vmax;
    z-index: -2;
    background: radial-gradient(circle at center, rgba(30, 123, 255, 0.12) 0%, transparent 60%);
    animation: mesh-float 25s infinite linear;
    pointer-events: none;
}

body::after {
    background: radial-gradient(circle at center, rgba(25, 210, 200, 0.08) 0%, transparent 50%);
    animation: mesh-float 35s infinite linear reverse;
    top: -50vmax;
    left: -50vmax;
}

@keyframes mesh-float {
    0% { transform: rotate(0deg) translate(5%, 5%); }
    50% { transform: rotate(180deg) translate(-5%, -5%); }
    100% { transform: rotate(360deg) translate(5%, 5%); }
}

.header {
    background: rgba(8, 12, 20, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section.hero {
    padding-top: clamp(7rem, 12vw, 10rem);
    padding-bottom: clamp(5rem, 8vw, 8rem);
    background:
        radial-gradient(circle at 50% 20%, rgba(30, 123, 255, 0.2), transparent 44%),
        radial-gradient(circle at 78% 75%, rgba(25, 210, 200, 0.14), transparent 35%),
        #04070f;
}

.hero-title {
    font-size: clamp(3.5rem, 10vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    display: inline-block;
}

.hero-title::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    animation: title-shimmer 4s infinite 1s;
    pointer-events: none;
}

@keyframes title-shimmer {
    0% { transform: translateX(-100%); }
    20%, 100% { transform: translateX(100%); }
}

.hero-full-form {
    color: #7cd6ff;
    letter-spacing: 0.18em;
}

.hero-subtitle {
    color: rgba(230, 238, 255, 0.78);
    max-width: 780px;
}

.hero-cta .btn {
    min-width: 190px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, #36f0d6, #1f86ff);
    color: #031321;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(31, 134, 255, 0.35);
}

.btn-primary:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
}

.container {
    max-width: 1500px;
}

.tool-grid {
    gap: 1.15rem;
}

.tool-card {
    background:
        linear-gradient(170deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02) 45%, rgba(255, 255, 255, 0.03)),
        rgba(9, 14, 25, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-4px) scale(1.003);
    border-color: rgba(var(--tool-accent-rgb, var(--apple-blue-rgb)), 0.35);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.tool-card h2 {
    font-size: 1.16rem;
    letter-spacing: -0.01em;
}

input,
select,
textarea {
    background: rgba(5, 9, 18, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 4px rgba(31, 134, 255, 0.2);
}

.output {
    background: rgba(5, 10, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-content {
    background: linear-gradient(180deg, rgba(11, 18, 34, 0.96), rgba(8, 13, 24, 0.97));
}

#creator-popout {
    background: rgba(9, 16, 32, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

#creator-popout:hover {
    box-shadow: 0 24px 42px rgba(0, 0, 0, 0.45);
}

.detailed-info-section {
    background:
        radial-gradient(900px 500px at 0% 100%, rgba(25, 210, 200, 0.12), transparent 40%),
        radial-gradient(900px 500px at 100% 0%, rgba(30, 123, 255, 0.12), transparent 50%),
        #070d17;
}

.feature-list li {
    background: rgba(11, 18, 34, 0.7);
}

@media (max-width: 767px) {
    .section.hero {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-title {
        font-size: clamp(2.2rem, 12vw, 3rem);
    }

    .hero-cta .btn {
        width: 100%;
        min-width: 0;
    }

    .tool-card {
        padding: 1rem;
    }
}

/* Landing Projects */
.project-links-section {
    padding: 4rem 1.5rem;
    background: radial-gradient(900px 500px at 0% 20%, rgba(25, 210, 200, 0.12), transparent 55%), rgba(7, 12, 22, 0.9);
    border-top: 1px solid var(--border-color);
}
.project-links-wrapper { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; }
.project-links-header { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.project-links-header h2 { margin: 0; }
.project-links-header .subhead { color: var(--text-secondary); margin: 0.25rem 0 0; }
.project-links-header .eyebrow { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.78rem; color: var(--accent-secondary); margin: 0 0 0.25rem; }
.project-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.project-card {
    display: block;
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(9, 14, 25, 0.7);
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}
.project-card h3 { margin: 0.4rem 0; }
.project-card p { margin: 0; color: var(--text-secondary); }
.project-card .pill {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #dff8ff;
}
.social-icon-row { display: flex; gap: 0.6rem; }
.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
    color: #dbe9ff;
    background: rgba(255, 255, 255, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.social-icon:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.08); }

@media (max-width: 720px) {
    .project-links-header { align-items: flex-start; }
    .social-icon-row { width: 100%; justify-content: flex-start; }
}

/* Hero-side project panel */
.hero-layout {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.25rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-side-projects {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.02)),
        rgba(12, 18, 28, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 1.1rem;
    display: grid;
    gap: 0.7rem;
    backdrop-filter: blur(14px);
    position: relative;
    z-index: 2;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

.hero-side-eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: var(--accent-secondary);
}

.hero-side-title {
    margin: 0;
    font-size: 1.12rem;
    letter-spacing: -0.01em;
    color: #f4f8ff;
}

.hero-side-intro {
    margin: 0;
    color: rgba(229, 238, 255, 0.78);
    font-size: 0.88rem;
    line-height: 1.45;
}

.hero-side-link {
    display: grid;
    gap: 0.22rem;
    text-decoration: none;
    color: #edf4ff;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 13px;
    padding: 0.7rem 0.8rem;
    font-size: 0.9rem;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    overflow: hidden;
}

.hero-side-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
    pointer-events: none;
}

.hero-side-link:hover {
    transform: translateX(3px) translateY(-1px);
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 20px rgba(8, 18, 35, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-side-link:hover::after {
    transform: translateX(120%);
}

.hero-side-link:focus-visible {
    outline: none;
    border-color: #7ec7ff;
    box-shadow: 0 0 0 3px rgba(126, 199, 255, 0.28);
}

.hero-side-link:active {
    transform: translateX(1px) scale(0.995);
}

.hero-side-link-title {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hero-side-link-desc {
    font-size: 0.79rem;
    color: rgba(223, 235, 255, 0.78);
    line-height: 1.35;
}

.hero-side-link-cta {
    margin-top: 0.25rem;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8fd7ff;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-side-link-cta i {
    font-size: 0.7rem;
}

.hero-social-inline {
    display: flex;
    gap: 0.55rem;
    justify-content: center;
    margin: 0.25rem 0 1.1rem;
}

.hero-side-social {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #eef5ff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    text-decoration: none;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.hero-side-social:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.38);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
}

@media (max-width: 980px) {
    .hero-layout {
        grid-template-columns: 1fr;
        max-width: 760px;
    }
    .hero-side-projects {
        max-width: 420px;
        margin: 0 auto;
        width: 100%;
    }
    .hero-social-inline {
        margin-bottom: 1rem;
    }
}

/* Global vertical lift */
.section.hero {
    padding-top: 8.7rem;
    padding-bottom: 7rem;
}

.container {
    padding-top: 1rem;
}

.project-links-section {
    padding-top: 3.1rem;
    padding-bottom: 3.1rem;
}

.detailed-info-section {
    padding-top: 3.2rem;
}

@media (max-width: 767px) {
    .section.hero {
        padding-top: 7.4rem;
        padding-bottom: 5.9rem;
    }
    .container {
        padding-top: 0.85rem;
    }
}

/* ===== Tool Box UI Upgrade ===== */
.tool-card-elevated {
    position: relative;
    isolation: isolate;
}

.tool-card-elevated::before {
    content: attr(data-badge);
    position: absolute;
    top: 0.85rem;
    right: 0.95rem;
    z-index: 3;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    color: #dff8ff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.tool-card-elevated::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(130deg, rgba(255, 255, 255, 0.08), transparent 38%);
    opacity: 0.65;
}

.tool-card-elevated[data-tone="critical"]::before { background: rgba(255, 93, 93, 0.2); color: #ffd3d3; }
.tool-card-elevated[data-tone="alert"]::before { background: rgba(255, 182, 73, 0.2); color: #ffecc9; }
.tool-card-elevated[data-tone="intel"]::before { background: rgba(102, 140, 255, 0.2); color: #dde5ff; }
.tool-card-elevated[data-tone="mystery"]::before { background: rgba(76, 211, 180, 0.2); color: #d6fff3; }
.tool-card-elevated[data-tone="secure"]::before { background: rgba(66, 214, 107, 0.22); color: #dcffe6; }
.tool-card-elevated[data-tone="network"]::before { background: rgba(31, 134, 255, 0.22); color: #d9ecff; }

.tool-card-header {
    gap: 0.8rem;
}

.tool-card-header h2 {
    padding-right: 5.8rem;
}

.tool-stepper {
    margin-bottom: 1.4rem;
    padding: 0 0.2rem;
}

.step-indicator {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
}

/* ===== Interactive Quick Guide ===== */
.quick-guide-shell {
    display: grid;
    gap: 1rem;
}

.quick-guide-head {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0.9rem;
    align-items: start;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(9, 16, 28, 0.66);
}

.quick-guide-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #7cd6ff;
    font-size: 1.5rem;
    background: linear-gradient(145deg, rgba(31, 134, 255, 0.22), rgba(25, 210, 200, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.quick-guide-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8bbcff;
    margin-bottom: 0.3rem;
}

.quick-guide-head h3 {
    margin: 0 0 0.3rem;
    font-size: 1.25rem;
}

.quick-guide-head p {
    margin: 0;
    color: var(--text-secondary);
}

.quick-guide-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.qg-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #dbe9ff;
    background: rgba(255, 255, 255, 0.07);
    font-weight: 700;
}

.qg-dot.active {
    background: linear-gradient(130deg, rgba(54, 240, 214, 0.95), rgba(31, 134, 255, 0.95));
    color: #041622;
    border-color: transparent;
}

.quick-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.qg-section {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(7, 12, 22, 0.72);
    padding: 0.85rem 0.9rem;
}

.qg-section h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: #cfe4ff;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.qg-section ul {
    margin: 0;
    padding-left: 1.05rem;
    color: var(--text-secondary);
    font-size: 0.87rem;
    line-height: 1.55;
}

.qg-section li + li {
    margin-top: 0.32rem;
}

.quick-guide-footer-nav {
    display: flex;
    gap: 0.7rem;
}

.quick-guide-footer-nav button {
    flex: 1;
}

@media (max-width: 767px) {
    .quick-guide-grid {
        grid-template-columns: 1fr;
    }

    .quick-guide-head {
        grid-template-columns: 1fr;
    }

    .quick-guide-icon {
        width: 54px;
        height: 54px;
        border-radius: 12px;
    }
}
