:root {
    --bg-dark: #050505;
    --bg-panel: #0a0a0a;
    --text-main: #ffffff;
    --text-dim: #888888;
    --border-color: #333333;
    /* Cyber White */
    --accent: #ffffff;

    --dock-bg: rgba(10, 10, 10, 0.8);
    --dock-border: rgba(255, 255, 255, 0.1);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

/* Modern Background & Layout */
body {
    background-color: var(--bg-dark);
    /* Grid Pattern */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;

    color: var(--text-main);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header Minimaliste */
header {
    padding: 1.5rem 2rem;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.status-badge {
    font-size: 0.8rem;
    color: var(--text-dim);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
}

/* Zone Principale */
#main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    padding-bottom: 80px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;

    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#main-content::-webkit-scrollbar {
    display: none;
}

/* DASHBOARD / HERO SECTION */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    min-height: 60vh;
}

/* RADAR ANIMATION */
.radar-container {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    position: relative;
    margin-bottom: 3rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent));
    transform-origin: 0 0;
    animation: sweep 2s infinite linear;
}

@keyframes sweep {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.radar-blip {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: blip 2s infinite ease-out;
    opacity: 0;
    position: absolute;
    top: 30%;
    left: 60%;
}

@keyframes blip {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(3);
    }
}

/* DASHBOARD STATS CARDS */
.dashboard-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    min-width: 200px;
    text-align: left;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-top: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* STYLISATION AVANCÉE (PRO CYBER) */
h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-left: 5px solid #ffffff;
    padding-left: 1.5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

/* Add a scanline effect to H2 on hover */
h2::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

p {
    color: #aaa;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Views Animations */
.view-section {
    display: none;
    animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding-bottom: 100px;
}

.view-section.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* DOCK STYLES (PRESERVED & REFINED) */
.dock-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.6rem;
    display: flex;
    gap: 0.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    max-width: 95%;
    overflow-x: auto;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dock-container::-webkit-scrollbar {
    display: none;
}

.dock-item {
    position: relative;
    height: 44px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #888;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.dock-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}

.dock-item.active {
    background: #fff;
    color: #000;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
    font-weight: 800;
    transform: scale(1.05);
}

/* TOOL PANELS (CYBER UPGRADE) */
.panel {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(50, 50, 50, 0.5);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s;
}

.panel:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    opacity: 0.5;
}

/* FORMS & INPUTS */
input,
textarea,
select {
    background: #050505;
    border: 1px solid #333;
    color: #fff;
    padding: 1.2rem;
    border-radius: 6px;
    font-family: 'Inter', monospace;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

input:focus,
textarea:focus {
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15), inset 0 2px 5px rgba(0, 0, 0, 0.5);
    outline: none;
    color: #ffffff;
}

/* ACTION BUTTONS */
/* ACTION BUTTONS */
.action-btn {
    background: #ffffff;
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    width: auto;
    min-width: 200px;
    clip-path: polygon(0 0, 100% 0, 100% 75%, 95% 100%, 0 100%);

    /* Anchor tag support */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.9rem;
}

.action-btn:hover {
    background: #fff;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    color: #000;
}

.action-btn:active {
    transform: scale(0.95);
}

/* Result Header & Text Styling */
.result-success-header {
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.result-file-info {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 25px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
    border-radius: 4px;
    display: inline-block;
}

.result-container-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    animation: fadeUp 0.3s ease-out;
}

/* RESULT BOXES (Integrated Copy) */
.result-box {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #222;
    border-left: 3px solid #ffffff;
    padding: 2rem;
    border-radius: 0 8px 8px 0;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    margin-top: 2rem;
    font-size: 1.1rem;
    color: #ccc;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-height: 80px;
    display: flex;
    /* Flex layout for copy integration */
    flex-direction: column;
    gap: 1rem;
}

.result-box::before {
    content: 'TERMINAL OUTPUT';
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 0.6rem;
    color: #444;
    background: #000;
    padding: 0 5px;
}

/* Hide terminal output label for QR code, compression, converter and URL results */
#qr-result::before,
#compress-result::before,
#convert-result::before,
#url-result::before {
    display: none;
}

#qr-result,
#compress-result,
#convert-result {
    border-left: none;
    border-radius: 8px;
    font-family: var(--font-main);
    white-space: normal;
}

.result-header {
    display: flex;
    justify-content: flex-end;
}

.result-content {
    word-break: break-all;
    width: 100%;
}

/* CUSTOM FILE UPLOAD */
.file-drop-zone {
    display: block;
    width: 100%;
    border: 2px dashed #333;
    border-radius: 8px;
    padding: 2.5rem;
    text-align: center;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    margin-bottom: 2rem;
}

.file-drop-zone:hover {
    border-color: #ffffff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.file-drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    color: #444;
    transition: color 0.3s;
}

.file-drop-zone:hover .file-icon {
    color: #ffffff;
}

/* CUSTOM RANGE SLIDER */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    padding: 0;
    margin: 10px 0;
    border: none;
    box-shadow: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    border: 2px solid #fff;
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
}

input[type=range]:focus {
    outline: none;
    border: none;
}

/* TECH TOGGLE BUTTONS (Replacing checkbox style) */
.cyber-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 1.5rem 0;
}

.check-label {
    position: relative;
    cursor: pointer;
    background: #0a0a0a;
    border: 1px solid #333;
    padding: 8px 4px;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    color: #666;
    display: flex;
    flex-direction: row;
    /* Changed to Row */
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Increased gap slightly */
    user-select: none;
    font-size: 0.65rem;
    letter-spacing: 1px;
}

.check-label input {
    display: none;
}

.check-label:hover {
    border-color: #666;
    color: #aaa;
    background: #111;
}

.check-label.checked {
    border-color: #ffffff;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

/* Hide the old indicator square if still in HTML, or style it as a tiny light */
.check-indicator {
    width: 6px;
    height: 6px;
    background: #444;
    border-radius: 50%;
    margin: 0;
    /* No margin, use gap */
    transition: all 0.3s;
    border: none;
}

.check-label.checked .check-indicator {
    background: #ffffff;
    box-shadow: 0 0 10px #ffffff;
    transform: scale(1.5);
}

/* Copy Button Integrated */
.copy-icon-btn {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-icon-btn:hover {
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* RESULT CARDS & STATS */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: #111;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    text-align: center;
    transition: transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-box:hover {
    border-color: #555;
    transform: translateY(-2px);
}

.stat-box.highlight {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.stat-label-sm {
    color: #666;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stat-value-lg {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
}

.result-preview-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.result-preview-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.conversion-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.flow-arrow {
    color: var(--accent);
    font-size: 1.5rem;
    animation: pulseArrow 2s infinite;
}

@keyframes pulseArrow {

    0%,
    100% {
        opacity: 0.5;
        transform: translateX(0);
    }

    50% {
        opacity: 1;
        transform: translateX(5px);
    }
}