/* =========================================================
   ThreatHawk Encoder & Decoder
   Dark Red Module Theme
========================================================= */


/* =========================================================
   Root Variables
========================================================= */

:root {
    --background-primary: #070708;
    --background-secondary: #0d0d0f;
    --background-tertiary: #131316;
    --background-elevated: #18181c;

    --surface-primary: rgba(18, 18, 21, 0.94);
    --surface-secondary: rgba(24, 24, 28, 0.92);
    --surface-hover: rgba(239, 68, 68, 0.08);

    --border-primary: rgba(255, 255, 255, 0.09);
    --border-secondary: rgba(255, 255, 255, 0.14);
    --border-accent: rgba(239, 68, 68, 0.45);

    --text-primary: #f8fafc;
    --text-secondary: #b6b6bf;
    --text-muted: #74747f;
    --text-dark: #151518;

    --accent-primary: #ef4444;
    --accent-secondary: #dc2626;
    --accent-dark: #991b1b;
    --accent-light: #f87171;

    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #60a5fa;

    --red-glow-small:
        0 0 14px rgba(239, 68, 68, 0.18);

    --red-glow-medium:
        0 0 30px rgba(239, 68, 68, 0.18);

    --red-glow-large:
        0 0 70px rgba(220, 38, 38, 0.18);

    --shadow-small:
        0 8px 22px rgba(0, 0, 0, 0.28);

    --shadow-medium:
        0 18px 45px rgba(0, 0, 0, 0.36);

    --shadow-large:
        0 26px 80px rgba(0, 0, 0, 0.52);

    --radius-small: 8px;
    --radius-medium: 14px;
    --radius-large: 20px;
    --radius-pill: 999px;

    --transition-fast: 160ms ease;
    --transition-normal: 240ms ease;

    --container-width: 1380px;
}


/* =========================================================
   Reset
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text-primary);

    background:
        radial-gradient(
            circle at 12% 8%,
            rgba(153, 27, 27, 0.22),
            transparent 31%
        ),
        radial-gradient(
            circle at 88% 26%,
            rgba(239, 68, 68, 0.1),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #050506 0%,
            #09090b 48%,
            #060607 100%
        );

    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        );

    background-size: 42px 42px;

    mask-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.88),
            transparent 92%
        );
}

body::after {
    content: "";
    position: fixed;
    width: 420px;
    height: 420px;
    right: -170px;
    top: 28%;
    z-index: -1;
    pointer-events: none;

    border-radius: 50%;
    background: rgba(220, 38, 38, 0.12);
    filter: blur(115px);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

textarea {
    resize: vertical;
}


/* =========================================================
   Accessibility
========================================================= */

:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
}

::selection {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.65);
}


/* =========================================================
   Shared Container
========================================================= */

.module-container {
    width: min(
        calc(100% - 48px),
        var(--container-width)
    );

    margin-inline: auto;
}


/* =========================================================
   Header and Navigation
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);

    background:
        rgba(7, 7, 8, 0.91);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    transition:
        background var(--transition-normal),
        border-color var(--transition-normal);
}

body.light-theme .site-header {
    border-bottom-color:
        rgba(24, 24, 27, 0.1);

    background:
        rgba(250, 250, 250, 0.92);
}


/* Main navbar */

.navbar {
    width: 100%;

    min-height:
        78px;

    padding-inline:
        max(
            24px,
            calc(
                (100% - var(--container-width)) / 2
            )
        );

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap:
        24px;
}


/* ThreatHawk logo */

.logo {
    flex-shrink:
        0;
}

.logo h2 {
    margin:
        0;

    color:
        #00d4ff;

    font-size:
        24px;

    font-weight:
        800;

    letter-spacing:
        -0.04em;
}

.logo h2::before {
    content:
        "◈";

    margin-right:
        10px;

    font-size:
        18px;
}


/* Primary navigation */

.navbar nav {
    margin-left:
        auto;
}

.navbar nav > ul {
    display:
        flex;

    align-items:
        center;

    gap:
        30px;

    margin:
        0;

    padding:
        0;

    list-style:
        none;
}

.navbar nav > ul > li {
    list-style:
        none;
}

.navbar nav li::marker {
    content:
        "";
}

.navbar nav a {
    position:
        relative;

    color:
        var(--text-secondary);

    font-size:
        14px;

    font-weight:
        600;

    transition:
        color var(--transition-normal);
}

.navbar nav > ul > li > a::after {
    content:
        "";

    position:
        absolute;

    left:
        0;

    bottom:
        -8px;

    width:
        100%;

    height:
        2px;

    background:
        #00d4ff;

    transform:
        scaleX(0);

    transform-origin:
        center;

    transition:
        transform var(--transition-normal);
}

.navbar nav > ul > li > a:hover,
.navbar nav > ul > li > a.active {
    color:
        var(--text-primary);
}

.navbar nav > ul > li > a:hover::after,
.navbar nav > ul > li > a.active::after {
    transform:
        scaleX(1);
}


/* Navigation actions */

.nav-actions {
    display:
        flex;

    align-items:
        center;

    flex-shrink:
        0;

    gap:
        10px;
}


/* Version badge */

.version {
    padding:
        7px 12px;

    color:
        #00d4ff;

    background:
        rgba(0, 212, 255, 0.12);

    border:
        1px solid rgba(0, 212, 255, 0.22);

    border-radius:
        var(--radius-pill);

    font-size:
        12px;

    font-weight:
        700;

    letter-spacing:
        0.04em;
}


/* =========================================================
   Modules Dropdown
========================================================= */

.nav-dropdown {
    position:
        relative;
}

.dropdown-toggle {
    display:
        flex;

    align-items:
        center;

    gap:
        8px;

    padding:
        0;

    color:
        var(--text-secondary);

    background:
        none;

    border:
        none;

    cursor:
        pointer;

    font-family:
        inherit;

    font-size:
        14px;

    font-weight:
        600;

    transition:
        color var(--transition-normal);
}

.dropdown-toggle:hover,
.dropdown-toggle.active {
    color:
        var(--text-primary);
}

.dropdown-toggle.active {
    position:
        relative;
}

.dropdown-toggle.active::after {
    content:
        "";

    position:
        absolute;

    left:
        0;

    right:
        0;

    bottom:
        -8px;

    height:
        2px;

    background:
        #00d4ff;

    border-radius:
        var(--radius-pill);
}


/* Dropdown arrow */

.dropdown-arrow {
    width:
        14px;

    height:
        14px;

    fill:
        none;

    stroke:
        currentColor;

    stroke-width:
        2.2;

    stroke-linecap:
        round;

    stroke-linejoin:
        round;

    transition:
        transform 0.25s ease;
}

.nav-dropdown.active .dropdown-arrow {
    transform:
        rotate(180deg);
}


/* Dropdown panel */

.dropdown-menu {
    position:
        absolute;

    top:
        calc(100% + 18px);

    left:
        50%;

    min-width:
        260px;

    padding:
        10px;

    background:
        rgba(18, 18, 21, 0.98);

    border:
        1px solid var(--border-primary);

    border-radius:
        14px;

    box-shadow:
        0 20px 50px
        rgba(0, 0, 0, 0.4);

    opacity:
        0;

    visibility:
        hidden;

    pointer-events:
        none;

    transform:
        translateX(-50%)
        translateY(10px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;

    z-index:
        2000;
}

body.light-theme .dropdown-menu {
    background:
        rgba(255, 255, 255, 0.98);
}

.nav-dropdown.active .dropdown-menu {
    opacity:
        1;

    visibility:
        visible;

    pointer-events:
        auto;

    transform:
        translateX(-50%)
        translateY(0);
}

.dropdown-menu li {
    width:
        100%;
}

.dropdown-menu a {
    display:
        flex;

    align-items:
        center;

    gap:
        12px;

    padding:
        12px 14px;

    color:
        var(--text-secondary);

    border-radius:
        10px;

    font-size:
        14px;

    font-weight:
        600;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.dropdown-menu a::after {
    display:
        none;
}

.dropdown-menu a:hover {
    color:
        #00d4ff;

    background:
        rgba(0, 212, 255, 0.08);

    transform:
        translateX(4px);
}

.dropdown-menu a.current-module {
    color:
        #00d4ff;

    background:
        rgba(0, 212, 255, 0.1);
}


/* Dropdown icons */

.dropdown-icon {
    width:
        20px;

    height:
        20px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    flex-shrink:
        0;

    color:
        currentColor;
}

.dropdown-icon svg {
    width:
        18px;

    height:
        18px;

    fill:
        none;

    stroke:
        currentColor;

    stroke-width:
        1.8;

    stroke-linecap:
        round;

    stroke-linejoin:
        round;
}


/* =========================================================
   Theme Toggle
========================================================= */

.theme-toggle {
    min-height:
        40px;

    padding:
        8px 12px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        8px;

    color:
        var(--text-secondary);

    background:
        rgba(255, 255, 255, 0.03);

    border:
        1px solid var(--border-primary);

    border-radius:
        10px;

    cursor:
        pointer;

    font-size:
        12px;

    font-weight:
        700;

    transition:
        color var(--transition-normal),
        background var(--transition-normal),
        border-color var(--transition-normal),
        transform var(--transition-normal);
}

.theme-toggle:hover {
    color:
        #00d4ff;

    border-color:
        rgba(0, 212, 255, 0.3);

    background:
        rgba(0, 212, 255, 0.06);

    transform:
        translateY(-1px);
}

.theme-toggle i {
    color:
        #00d4ff;

    font-size:
        14px;
}


/* =========================================================
   Module Header
========================================================= */

.module-header {
    position: relative;
    overflow: hidden;

    padding: 58px 0 46px;

    border-bottom: 1px solid var(--border-primary);
}

.module-header::before {
    content: "";

    position: absolute;
    width: 300px;
    height: 300px;
    left: 4%;
    top: -145px;

    border-radius: 50%;

    background:
        rgba(220, 38, 38, 0.15);

    filter: blur(80px);
    pointer-events: none;
}

.breadcrumb {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 23px;

    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.breadcrumb a {
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--accent-light);
}

.module-heading {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.module-heading-content {
    max-width: 850px;
}

.eyebrow,
.panel-label {
    display: inline-block;

    margin-bottom: 10px;

    color: var(--accent-light);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.module-heading h1 {
    margin-bottom: 15px;

    font-size: clamp(2.35rem, 5vw, 4.45rem);
    line-height: 1.03;
    letter-spacing: -0.055em;
}

.module-description {
    max-width: 780px;
    margin-bottom: 0;

    color: var(--text-secondary);
    font-size: 1rem;
}

.module-status {
    flex-shrink: 0;

    min-width: 170px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 17px;

    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 13px;

    background:
        rgba(34, 197, 94, 0.055);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.18);
}

.status-dot {
    width: 11px;
    height: 11px;
    flex-shrink: 0;

    border-radius: 50%;
    background: var(--success);

    box-shadow:
        0 0 0 5px rgba(34, 197, 94, 0.12),
        0 0 18px rgba(34, 197, 94, 0.55);
}

.module-status div {
    display: flex;
    flex-direction: column;
}

.module-status small {
    color: var(--text-muted);
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.module-status strong {
    color: #dcfce7;
    font-size: 0.94rem;
}


/* =========================================================
   Converter Section
========================================================= */

.converter-section {
    padding: 54px 0 28px;
}

.converter-workspace {
    position: relative;
    overflow: hidden;

    padding: 30px;

    border: 1px solid var(--border-primary);
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            145deg,
            rgba(24, 24, 28, 0.97),
            rgba(13, 13, 15, 0.97)
        );

    box-shadow:
        var(--shadow-large),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.converter-workspace::before {
    content: "";

    position: absolute;
    width: 260px;
    height: 260px;
    right: -105px;
    top: -120px;

    border-radius: 50%;
    pointer-events: none;

    background:
        rgba(239, 68, 68, 0.12);

    filter: blur(75px);
}

.workspace-heading {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;

    margin-bottom: 23px;
}

.workspace-heading h2 {
    margin-bottom: 8px;

    font-size: clamp(1.45rem, 3vw, 2.15rem);
    letter-spacing: -0.035em;
}

.workspace-heading p {
    max-width: 720px;
    margin-bottom: 0;

    color: var(--text-secondary);
}

.local-processing-badge {
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 9px 12px;

    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-pill);

    color: #fecaca;
    background: rgba(239, 68, 68, 0.075);

    font-size: 0.76rem;
    font-weight: 700;
}


/* =========================================================
   Privacy Notice
========================================================= */

.privacy-notice {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 24px;
    padding: 15px 17px;

    border: 1px solid rgba(239, 68, 68, 0.16);
    border-radius: 12px;

    background:
        rgba(239, 68, 68, 0.045);
}

.privacy-notice-icon {
    width: 39px;
    height: 39px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 10px;

    color: var(--accent-light);
    background: rgba(239, 68, 68, 0.1);
}

.privacy-notice strong {
    display: block;
    margin-bottom: 2px;

    font-size: 0.9rem;
}

.privacy-notice p {
    margin-bottom: 0;

    color: var(--text-secondary);
    font-size: 0.83rem;
}


/* =========================================================
   Format and Operation Controls
========================================================= */

.converter-controls {
    display: grid;
    grid-template-columns:
        minmax(260px, 1fr)
        minmax(310px, 1fr);

    gap: 20px;

    margin-bottom: 24px;
}

.control-group {
    min-width: 0;
}

.control-group label,
.operation-control legend {
    display: block;

    margin-bottom: 9px;

    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.operation-control {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.select-wrapper {
    position: relative;
}

.select-wrapper > i {
    position: absolute;
    left: 15px;
    top: 50%;
    z-index: 2;

    color: var(--accent-light);

    transform: translateY(-50%);
    pointer-events: none;
}

.select-wrapper select {
    width: 100%;
    min-height: 48px;

    appearance: none;
    -webkit-appearance: none;

    padding: 0 44px;

    border: 1px solid var(--border-secondary);
    border-radius: 11px;

    color: var(--text-primary);
    background:
        linear-gradient(
            180deg,
            rgba(29, 29, 34, 0.98),
            rgba(18, 18, 22, 0.98)
        );

    outline: none;

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.select-wrapper::after {
    content: "\f078";

    position: absolute;
    right: 16px;
    top: 50%;

    color: var(--text-muted);

    font-family: "Font Awesome 6 Free";
    font-size: 0.75rem;
    font-weight: 900;

    transform: translateY(-50%);
    pointer-events: none;
}

.select-wrapper select:hover,
.select-wrapper select:focus {
    border-color: var(--border-accent);

    background:
        linear-gradient(
            180deg,
            rgba(36, 24, 26, 0.98),
            rgba(20, 16, 18, 0.98)
        );

    box-shadow: var(--red-glow-small);
}

.select-wrapper select option {
    color: var(--text-primary);
    background: #17171a;
}

.operation-toggle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    min-height: 48px;
    padding: 4px;

    border: 1px solid var(--border-secondary);
    border-radius: 11px;

    background: rgba(4, 4, 5, 0.42);
}

.operation-option {
    position: relative;
    min-width: 0;
    margin: 0;
}

.operation-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.operation-option span {
    min-height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 7px 13px;

    border-radius: 8px;

    color: var(--text-muted);

    font-size: 0.8rem;
    font-weight: 750;

    cursor: pointer;

    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast);
}

.operation-option span:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.operation-option input:checked + span {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--accent-primary),
            var(--accent-secondary)
        );

    box-shadow:
        0 6px 18px rgba(220, 38, 38, 0.28);
}


/* =========================================================
   Input and Output Grid
========================================================= */

.converter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    align-items: stretch;
    gap: 22px;

    margin-bottom: 24px;
}

.converter-panel {
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 18px;

    border: 1px solid var(--border-primary);
    border-radius: 15px;

    background:
        linear-gradient(
            180deg,
            rgba(20, 20, 24, 0.98),
            rgba(12, 12, 15, 0.98)
        );

    box-shadow:
        var(--shadow-medium),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    transition:
        border-color var(--transition-normal),
        box-shadow var(--transition-normal),
        transform var(--transition-normal);
}

.converter-panel:hover {
    border-color: rgba(239, 68, 68, 0.22);
}

.converter-panel:focus-within {
    border-color: var(--border-accent);

    box-shadow:
        var(--shadow-medium),
        var(--red-glow-medium);

    transform: translateY(-1px);
}

.converter-panel-heading {
    min-height: 61px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 14px;
}

.converter-panel-heading h3 {
    margin-bottom: 0;

    font-size: 1.02rem;
    letter-spacing: -0.02em;
}

.converter-panel-heading .panel-label {
    margin-bottom: 4px;

    font-size: 0.66rem;
}

.panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.icon-button {
    min-height: 35px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 0 10px;

    border: 1px solid var(--border-primary);
    border-radius: 8px;

    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.025);

    font-size: 0.72rem;
    font-weight: 700;

    transition:
        color var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast);
}

.icon-button:hover:not(:disabled) {
    color: #ffffff;
    border-color: var(--border-accent);
    background: rgba(239, 68, 68, 0.085);
    transform: translateY(-1px);
}

.icon-button:disabled {
    color: #55555f;
    opacity: 0.58;
}

.textarea-wrapper {
    position: relative;
    flex: 1;
    min-height: 430px;
}

.converter-textarea {
    width: 100%;
    height: 100%;
    min-height: 430px;

    display: block;

    padding: 17px;

    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 11px;

    color: #f8fafc;
    caret-color: var(--accent-light);

    background:
        linear-gradient(
            180deg,
            rgba(5, 5, 7, 0.9),
            rgba(9, 9, 12, 0.96)
        );

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;

    font-size: 0.87rem;
    line-height: 1.72;

    outline: none;

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.converter-textarea::placeholder {
    color: #565661;
}

.converter-textarea:hover {
    border-color: rgba(255, 255, 255, 0.13);
}

.converter-textarea:focus {
    border-color: rgba(239, 68, 68, 0.62);

    background:
        linear-gradient(
            180deg,
            rgba(11, 7, 9, 0.98),
            rgba(8, 7, 9, 0.98)
        );

    box-shadow:
        inset 0 0 0 1px rgba(239, 68, 68, 0.08),
        0 0 0 3px rgba(239, 68, 68, 0.075);
}

.output-panel .converter-textarea {
    color: #fecaca;
}

.converter-textarea::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.converter-textarea::-webkit-scrollbar-track {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.converter-textarea::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.34);
}

.converter-textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(239, 68, 68, 0.52);
}

.panel-meta {
    min-height: 32px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-top: 12px;
    padding: 0 2px;

    color: var(--text-muted);
    font-size: 0.72rem;
}

.panel-meta strong {
    color: var(--text-secondary);
}


/* =========================================================
   Workspace Buttons
========================================================= */

.workspace-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    flex-wrap: wrap;

    margin-bottom: 23px;
}

.primary-button,
.secondary-button {
    min-height: 45px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 0 18px;

    border-radius: 10px;

    font-size: 0.81rem;
    font-weight: 800;

    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast),
        color var(--transition-fast);
}

.primary-button {
    border: 1px solid var(--accent-primary);

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--accent-primary),
            var(--accent-secondary)
        );

    box-shadow:
        0 10px 25px rgba(220, 38, 38, 0.25);
}

.primary-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 34px rgba(220, 38, 38, 0.34),
        var(--red-glow-small);
}

.primary-button:active {
    transform: translateY(0);
}

.secondary-button {
    border: 1px solid var(--border-secondary);

    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.028);
}

.secondary-button:hover {
    color: #ffffff;
    border-color: var(--border-accent);
    background: rgba(239, 68, 68, 0.075);
    transform: translateY(-1px);
}


/* =========================================================
   Conversion Status
========================================================= */

.conversion-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;

    padding: 15px 17px;

    border: 1px solid var(--border-primary);
    border-radius: 12px;

    background:
        rgba(6, 6, 8, 0.48);
}

.status-message {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-message > i {
    width: 35px;
    height: 35px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 9px;

    color: var(--accent-light);
    background: rgba(239, 68, 68, 0.09);
}

.status-message .panel-label {
    margin-bottom: 1px;
    font-size: 0.6rem;
}

.status-message strong {
    display: block;
    font-size: 0.83rem;
}

.status-details {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;

    color: var(--text-muted);
    font-size: 0.72rem;
}

.status-details strong {
    color: var(--text-secondary);
}


/* =========================================================
   Section Headings
========================================================= */

.formats-section,
.information-section {
    padding: 34px 0;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;

    margin-bottom: 22px;
}

.section-heading h2 {
    margin-bottom: 0;

    font-size: clamp(1.45rem, 3vw, 2rem);
    letter-spacing: -0.035em;
}

.section-heading p {
    max-width: 520px;
    margin-bottom: 0;

    color: var(--text-secondary);
    font-size: 0.88rem;
}


/* =========================================================
   Format Cards
========================================================= */

.formats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.format-card {
    position: relative;
    overflow: hidden;

    min-height: 220px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    padding: 21px;

    border: 1px solid var(--border-primary);
    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            rgba(21, 21, 25, 0.94),
            rgba(12, 12, 15, 0.96)
        );

    box-shadow: var(--shadow-small);

    transition:
        transform var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

.format-card::after {
    content: "";

    position: absolute;
    width: 130px;
    height: 130px;
    right: -70px;
    bottom: -75px;

    border-radius: 50%;

    background: rgba(239, 68, 68, 0.1);
    filter: blur(35px);

    transition: transform var(--transition-normal);
}

.format-card:hover {
    border-color: rgba(239, 68, 68, 0.31);

    transform: translateY(-4px);

    box-shadow:
        var(--shadow-medium),
        var(--red-glow-small);
}

.format-card:hover::after {
    transform: scale(1.22);
}

.format-icon,
.information-icon {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    margin-bottom: 16px;

    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 12px;

    color: var(--accent-light);
    background: rgba(239, 68, 68, 0.075);
}

.format-card h3,
.information-card h3 {
    margin-bottom: 8px;

    font-size: 1rem;
    letter-spacing: -0.02em;
}

.format-card p,
.information-card p {
    margin-bottom: 16px;

    color: var(--text-secondary);
    font-size: 0.82rem;
}

.format-capability {
    margin-top: auto;
    padding: 6px 9px;

    border: 1px solid rgba(239, 68, 68, 0.17);
    border-radius: var(--radius-pill);

    color: #fecaca;
    background: rgba(239, 68, 68, 0.055);

    font-size: 0.65rem;
    font-weight: 750;
}


/* =========================================================
   Information Cards
========================================================= */

.information-section {
    padding-bottom: 62px;
}

.information-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.information-card {
    min-height: 205px;

    padding: 22px;

    border: 1px solid var(--border-primary);
    border-radius: 15px;

    background:
        rgba(17, 17, 20, 0.78);

    box-shadow: var(--shadow-small);

    transition:
        transform var(--transition-normal),
        border-color var(--transition-normal),
        background var(--transition-normal);
}

.information-card:hover {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(22, 18, 20, 0.92);
    transform: translateY(-3px);
}

.information-card p {
    margin-bottom: 0;
}


/* =========================================================
   Footer
========================================================= */

.site-footer {
    border-top: 1px solid var(--border-primary);

    background:
        rgba(5, 5, 6, 0.84);
}

.footer-content {
    min-height: 96px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-brand strong {
    font-size: 0.95rem;
}

.footer-brand span,
.footer-meta {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 19px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 650;

    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-light);
}


/* =========================================================
   Toast
========================================================= */

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2000;

    max-width: min(360px, calc(100% - 32px));

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 13px 16px;

    border: 1px solid rgba(239, 68, 68, 0.34);
    border-radius: 11px;

    color: var(--text-primary);
    background:
        rgba(17, 17, 20, 0.97);

    box-shadow:
        var(--shadow-large),
        var(--red-glow-small);

    font-size: 0.8rem;
    font-weight: 650;

    opacity: 0;
    visibility: hidden;

    transform: translateY(16px);

    transition:
        opacity var(--transition-normal),
        visibility var(--transition-normal),
        transform var(--transition-normal);
}

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

.toast i {
    color: var(--accent-light);
}


/* =========================================================
   Light Theme Preparation
========================================================= */

body.light-theme {
    --background-primary: #f4f4f5;
    --background-secondary: #ffffff;
    --background-tertiary: #f5f5f6;
    --background-elevated: #ffffff;

    --surface-primary: rgba(255, 255, 255, 0.96);
    --surface-secondary: rgba(250, 250, 251, 0.96);
    --surface-hover: rgba(220, 38, 38, 0.055);

    --border-primary: rgba(24, 24, 27, 0.1);
    --border-secondary: rgba(24, 24, 27, 0.16);

    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #71717a;

    background:
        radial-gradient(
            circle at 12% 8%,
            rgba(239, 68, 68, 0.09),
            transparent 31%
        ),
        linear-gradient(
            180deg,
            #fafafa,
            #f4f4f5
        );
}

body.light-theme .site-header {
    background: rgba(250, 250, 250, 0.91);
}

body.light-theme .converter-workspace,
body.light-theme .converter-panel,
body.light-theme .format-card {
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(247, 247, 248, 0.98)
        );
}

body.light-theme .information-card {
    background: rgba(255, 255, 255, 0.88);
}

body.light-theme .converter-textarea {
    color: #18181b;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fafafa
        );
}

body.light-theme .output-panel .converter-textarea {
    color: #991b1b;
}

body.light-theme .select-wrapper select {
    color: #18181b;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #f7f7f8
        );
}

body.light-theme .select-wrapper select option {
    color: #18181b;
    background: #ffffff;
}

body.light-theme .operation-toggle,
body.light-theme .conversion-status {
    background: rgba(255, 255, 255, 0.72);
}

body.light-theme .site-footer {
    background: rgba(250, 250, 250, 0.92);
}


/* =========================================================
   Responsive: Large Tablets and Small Laptops
========================================================= */

@media (max-width: 1180px) {

    .navbar {
        min-height:
            auto;

        padding-top:
            15px;

        padding-bottom:
            15px;

        flex-wrap:
            wrap;
    }

    .navbar nav {
        order:
            3;

        width:
            100%;

        margin-left:
            0;
    }

    .navbar nav > ul {
        width:
            100%;

        justify-content:
            center;

        flex-wrap:
            wrap;

        gap:
            18px;
    }

    .formats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   Responsive: Tablets
========================================================= */

@media (max-width: 900px) {

    .module-container {
        width: min(
            calc(100% - 32px),
            var(--container-width)
        );
    }

    .module-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
    }

    .module-status {
        min-width: 165px;
    }

    .workspace-heading,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .converter-controls {
        grid-template-columns: 1fr;
    }

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

    .textarea-wrapper,
    .converter-textarea {
        min-height: 350px;
    }

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

    .conversion-status {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-details {
        justify-content: flex-start;
    }

    .footer-content {
        padding-top: 24px;
        padding-bottom: 24px;
        align-items: flex-start;
        flex-direction: column;
    }

}


/* =========================================================
   Responsive: Mobile
========================================================= */

@media (max-width: 600px) {

    body::after {
        display: none;
    }

    .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .module-container {
        width: min(
            calc(100% - 24px),
            var(--container-width)
        );
    }

    .navbar {
        width:
            100%;

        padding-inline:
            12px;

        align-items:
            center;

        gap:
            13px;
    }

    .logo h2 {
        font-size:
            20px;
    }

    .nav-actions {
        margin-left:
            auto;
    }

    .navbar nav > ul {
        justify-content:
            flex-start;

        gap:
            15px;
    }

    .navbar nav a,
    .dropdown-toggle {
        font-size:
            13px;
    }

    .theme-toggle span {
        display: none;
    }

    .module-header {
        padding: 40px 0 34px;
    }

    .module-heading h1 {
        font-size: 2.45rem;
    }

    .module-description {
        font-size: 0.91rem;
    }

    .converter-section {
        padding-top: 30px;
    }

    .converter-workspace {
        padding: 18px;
        border-radius: 16px;
    }

    .local-processing-badge {
        align-self: flex-start;
    }

    .privacy-notice {
        align-items: flex-start;
    }

    .converter-panel {
        padding: 14px;
    }

    .converter-panel-heading {
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
    }

    .panel-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .textarea-wrapper,
    .converter-textarea {
        min-height: 300px;
    }

    .workspace-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .status-details {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

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

    .format-card,
    .information-card {
        min-height: auto;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .toast {
        right: 12px;
        bottom: 12px;
    }

}


/* =========================================================
   Extra Small Screens
========================================================= */

@media (max-width: 420px) {

    .version {
        display:
            none;
    }

    .navbar nav > ul {
        gap:
            12px;
    }

    .navbar nav a,
    .dropdown-toggle {
        font-size:
            12px;
    }

    .operation-toggle {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .panel-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

}

/* =========================================================
   KNOWLEDGE CENTER
========================================================= */

.knowledge-section {
    padding: 80px 0 20px;
}

.knowledge-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 25px;
}

.knowledge-card {
    position: relative;

    min-height: 195px;

    padding: 24px;

    background:
        var(--surface-primary);

    border:
        1px solid var(--border-accent);

    border-radius:
        var(--radius-medium);

    box-shadow:
        var(--shadow-small);

    transition:
        transform var(--transition-normal),
        border-color var(--transition-normal),
        background var(--transition-normal),
        box-shadow var(--transition-normal);
}

.knowledge-card:hover {
    background:
        var(--surface-secondary);

    border-color:
        var(--accent-primary);

    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.24),
        0 0 26px rgba(239, 68, 68, 0.1);

    transform:
        translateY(-5px);
}

.knowledge-header {
    margin-bottom: 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;
}

.knowledge-header h3 {
    margin: 0;

    color:
        var(--text-primary);

    font-size:
        19px;

    line-height:
        1.4;

    letter-spacing:
        -0.02em;
}

.knowledge-card p {
    margin: 0;

    color:
        var(--text-secondary);

    font-size:
        14px;

    line-height:
        1.75;
}


/* Information button */

.info-button {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    color:
        var(--accent-light);

    background:
        rgba(239, 68, 68, 0.08);

    border:
        1px solid var(--border-accent);

    border-radius:
        50%;

    cursor:
        pointer;

    font-size:
        16px;

    transition:
        color var(--transition-normal),
        background var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal),
        transform var(--transition-normal);
}

.info-button:hover {
    color:
        #ffffff;

    background:
        var(--accent-primary);

    border-color:
        var(--accent-primary);

    box-shadow:
        0 0 20px rgba(239, 68, 68, 0.24);

    transform:
        scale(1.08);
}


/* =========================================================
   KNOWLEDGE POPUP
========================================================= */

.knowledge-popup-overlay {
    position: fixed;

    inset: 0;

    z-index:
        9999;

    padding:
        24px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        rgba(0, 0, 0, 0.76);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity var(--transition-normal),
        visibility var(--transition-normal);
}

.knowledge-popup-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.knowledge-popup {
    position: relative;

    width:
        min(700px, 100%);

    max-height:
        min(80vh, 720px);

    padding:
        36px;

    overflow-y:
        auto;

    color:
        var(--text-primary);

    background:
        var(--background-elevated);

    border:
        1px solid var(--border-accent);

    border-radius:
        var(--radius-large);

    box-shadow:
        var(--shadow-large),
        0 0 45px rgba(239, 68, 68, 0.14);

    opacity: 0;

    transform:
        translateY(22px)
        scale(0.98);

    transition:
        opacity var(--transition-normal),
        transform var(--transition-normal),
        background var(--transition-normal),
        border-color var(--transition-normal);
}

.knowledge-popup-overlay.active
.knowledge-popup {
    opacity: 1;

    transform:
        translateY(0)
        scale(1);
}


/* Popup close button */

.popup-close {
    position:
        absolute;

    top:
        16px;

    right:
        16px;

    width:
        40px;

    height:
        40px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    color:
        var(--text-secondary);

    background:
        rgba(255, 255, 255, 0.05);

    border:
        1px solid var(--border-primary);

    border-radius:
        50%;

    cursor:
        pointer;

    font-size:
        16px;

    transition:
        color var(--transition-normal),
        background var(--transition-normal),
        border-color var(--transition-normal),
        transform var(--transition-normal);
}

.popup-close:hover {
    color:
        #ffffff;

    background:
        var(--accent-primary);

    border-color:
        var(--accent-primary);

    transform:
        rotate(90deg);
}


/* Popup content */

#popupTitle {
    max-width:
        calc(100% - 58px);

    margin-bottom:
        24px;

    color:
        var(--accent-light);

    font-size:
        clamp(24px, 4vw, 32px);

    line-height:
        1.2;

    letter-spacing:
        -0.035em;
}

#popupContent {
    color:
        var(--text-secondary);

    font-size:
        15px;

    line-height:
        1.85;
}

#popupContent p + p {
    margin-top:
        18px;
}

#popupContent h4 {
    margin-top:
        24px;

    margin-bottom:
        10px;

    color:
        var(--text-primary);

    font-size:
        17px;
}

#popupContent ul,
#popupContent ol {
    margin-top:
        14px;

    padding-left:
        22px;
}

#popupContent li {
    margin-bottom:
        11px;

    padding-left:
        4px;
}

#popupContent li::marker {
    color:
        var(--accent-light);

    font-weight:
        800;
}


/* =========================================================
   LIGHT THEME
========================================================= */

body.light-theme .knowledge-card,
body.light-theme .knowledge-popup {
    background:
        rgba(255, 255, 255, 0.97);
}

body.light-theme .knowledge-card:hover {
    background:
        #ffffff;
}

body.light-theme .info-button {
    color:
        var(--accent-dark);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
    .knowledge-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .knowledge-card:last-child {
        grid-column:
            1 / -1;
    }
}

@media (max-width: 650px) {
    .knowledge-section {
        padding-top:
            58px;
    }

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

    .knowledge-card:last-child {
        grid-column:
            auto;
    }

    .knowledge-card {
        min-height:
            0;

        padding:
            21px;
    }

    .knowledge-popup-overlay {
        padding:
            14px;
    }

    .knowledge-popup {
        max-height:
            84vh;

        padding:
            30px 22px 24px;
    }

    #popupTitle {
        padding-right:
            34px;

        font-size:
            24px;
    }

    #popupContent {
        font-size:
            14px;
    }
}

/* =========================================================
   FAQ SECTION
========================================================= */

.faq-section {
    padding:
        60px 0 20px;
}

.faq-list {
    margin-top:
        40px;

    display:
        grid;

    gap:
        16px;
}

.faq-item {
    overflow:
        hidden;

    background:
        var(--surface-primary);

    border:
        1px solid var(--border-primary);

    border-radius:
        var(--radius-large);

    box-shadow:
        var(--shadow-small);

    transition:
        background var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal),
        transform var(--transition-normal);
}

.faq-item:hover {
    border-color:
        var(--border-accent);

    transform:
        translateY(-2px);
}

.faq-item[open] {
    background:
        var(--surface-secondary);

    border-color:
        var(--border-accent);

    box-shadow:
        var(--shadow-medium);
}


/* FAQ question */

.faq-item summary {
    position:
        relative;

    padding:
        22px 64px 22px 24px;

    list-style:
        none;

    color:
        var(--text-primary);

    cursor:
        pointer;

    font-size:
        16px;

    font-weight:
        700;

    user-select:
        none;

    transition:
        color var(--transition-normal);
}

.faq-item summary:hover {
    color:
        var(--accent-light);
}

.faq-item summary::-webkit-details-marker {
    display:
        none;
}

.faq-item summary::marker {
    content:
        "";
}


/* Plus and minus icon */

.faq-item summary::after {
    content:
        "+";

    position:
        absolute;

    top:
        50%;

    right:
        24px;

    color:
        var(--accent-light);

    font-size:
        24px;

    font-weight:
        400;

    transform:
        translateY(-50%);

    transition:
        transform var(--transition-normal);
}

.faq-item[open] summary::after {
    content:
        "−";
}


/* FAQ answer */

.faq-item p {
    padding:
        0 24px 24px;

    color:
        var(--text-secondary);

    font-size:
        15px;

    line-height:
        1.8;
}


/* =========================================================
   FAQ LIGHT THEME
========================================================= */

body.light-theme .faq-item {
    background:
        rgba(255, 255, 255, 0.96);
}

body.light-theme .faq-item[open] {
    background:
        rgba(250, 250, 251, 0.98);
}


/* =========================================================
   FAQ RESPONSIVE
========================================================= */

@media (max-width: 768px) {
    .faq-section {
        padding-top:
            50px;
    }

    .faq-list {
        margin-top:
            30px;
    }

    .faq-item summary {
        padding:
            18px 54px 18px 18px;

        font-size:
            15px;
    }

    .faq-item summary::after {
        right:
            18px;
    }

    .faq-item p {
        padding:
            0 18px 18px;

        font-size:
            14px;
    }
}

/* =========================================================
   RELATED TOOLS
========================================================= */

.related-tools-section {
    padding: 70px 0 30px;
}

.related-tools-section .section-heading {
    margin-bottom: 34px;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.related-tool-card {
    position: relative;
    min-height: 190px;
    padding: 26px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    color: inherit;
    text-decoration: none;
    background: var(--surface-transparent);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
    overflow: hidden;
    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.related-tool-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    opacity: 0;
    transform: scaleX(0.4);
    transform-origin: center;
    transition:
        opacity var(--transition),
        transform var(--transition);
}

.related-tool-card:hover {
    background: var(--surface-secondary);
    border-color: var(--border-accent);
    box-shadow:
        var(--shadow-large),
        0 0 28px rgba(59, 130, 246, 0.12);
    transform: translateY(-5px);
}

.related-tool-card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.related-tool-icon {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent-bright);
    background: rgba(59, 130, 246, 0.10);
    border: 1px solid var(--border-accent);
    border-radius: 14px;
    font-size: 20px;
    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.related-tool-card:hover .related-tool-icon {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
    transform: rotate(-4deg) scale(1.06);
}

.related-tool-content {
    min-width: 0;
}

.related-tool-content h3 {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-size: 19px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.related-tool-content p {
    margin: 0 0 18px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.75;
}

.related-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-bright);
    font-size: 14px;
    font-weight: 700;
    transition:
        letter-spacing var(--transition),
        transform var(--transition);
}

.related-tool-card:hover .related-link {
    letter-spacing: 0.02em;
    transform: translateX(4px);
}

body.light-mode .related-tool-card {
    background: rgba(255, 255, 255, 0.96);
}

body.light-mode .related-tool-card:hover {
    background: #ffffff;
}

@media (max-width: 768px) {

    .related-tools-section {
        padding-top: 55px;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }

    .related-tool-card {
        min-height: 0;
        padding: 22px;
    }

}

@media (max-width: 480px) {

    .related-tool-card {
        gap: 15px;
        padding: 19px;
    }

    .related-tool-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .related-tool-content h3 {
        font-size: 17px;
    }

    .related-tool-content p {
        font-size: 13px;
    }

}