
/* IPCrypt Website Styles */

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

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.space-x-4>*+* {
    margin-left: 1rem;
}

.space-x-6>*+* {
    margin-left: 1.5rem;
}

.space-y-2>*+* {
    margin-top: 0.5rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

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

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.text-gray-500 {
    color: var(--color-text-light);
}

.text-gray-600 {
    color: var(--color-text-light);
}

.text-gray-700 {
    color: var(--color-text);
}

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

.bg-white {
    background-color: white;
}

.bg-gray-50 {
    background-color: var(--color-background);
}

.border-t {
    border-top: 1px solid var(--color-border);
}

.pt-8 {
    padding-top: 2rem;
}

.min-h-screen {
    min-height: 100vh;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.flex-grow {
    flex-grow: 1;
}

/* Mobile Navigation */
#mobile-menu-button {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease;
}

#mobile-menu-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

#mobile-menu-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary-dark);
}

#mobile-menu {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: top;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-height: 80vh;
    overflow-y: auto;
}

#mobile-menu.hidden {
    display: block;
    transform: scaleY(0);
    opacity: 0;
    height: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    transform: scaleY(1);
    opacity: 1;
}

#mobile-menu a {
    border-bottom: 1px solid var(--color-border);
    padding-left: 1rem;
    padding-right: 1rem;
    transition: background-color 0.2s ease;
}

#mobile-menu a:last-child {
    border-bottom: none;
}

#mobile-menu a:hover {
    background-color: var(--color-background);
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 100;
    }

    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .mode-card {
        padding: 1rem;
    }

    .diagram-container {
        margin: 1rem 0;
        font-size: 0.7rem;
    }

    .mode-comparison {
        font-size: 0.8rem;
    }

    .mode-comparison th,
    .mode-comparison td {
        padding: 0.5rem;
    }
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }

    .md\:hidden {
        display: none;
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:mb-0 {
        margin-bottom: 0;
    }

    .md\:text-5xl {
        font-size: 3rem;
    }
}

/* Custom Variables */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-secondary: #10b981;
    --color-secondary-dark: #059669;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-background: #f8fafc;
    --color-border: #e2e8f0;
    --color-code-bg: #f1f5f9;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Base Styles */
body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-text);
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

/* Header & Footer */
.site-header {
    border-bottom: 1px solid var(--color-border);
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-footer {
    border-top: 1px solid var(--color-border);
    background-color: white;
    color: var(--color-text-light);
    padding: 2rem 0;
}

/* Custom Components */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-align: center;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.btn:hover::before {
    transform: translateX(0);
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: 1px solid var(--color-primary-dark);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
    border: 1px solid var(--color-secondary-dark);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-dark);
}

.btn-accent {
    background-color: var(--color-accent);
    color: white;
    border: 1px solid var(--color-accent-dark);
}

.btn-accent:hover {
    background-color: var(--color-accent-dark);
}

.btn-warning {
    background-color: var(--color-warning);
    color: white;
    border: 1px solid var(--color-warning);
}

.btn-warning:hover {
    background-color: #e08e0b;
}

.btn-danger {
    background-color: var(--color-danger);
    color: white;
    border: 1px solid var(--color-danger);
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

.mt-4 {
    margin-top: 1rem;
}

/* Playground styles */
.card {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    background-color: white;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.w-full {
    width: 100%;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.border {
    border: 1px solid var(--color-border);
}

.rounded {
    border-radius: 0.375rem;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.text-gray-600 {
    color: #4b5563;
}

.text-sm {
    font-size: 0.875rem;
}

.font-medium {
    font-weight: 500;
}

.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

.space-x-4>*+* {
    margin-left: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

/* Encryption Diagrams */
.diagram-container {
    margin: 2rem 0;
    overflow-x: auto;
}

.encryption-diagram {
    font-family: var(--font-mono);
    line-height: 1.2;
    white-space: pre;
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    color: #1e293b;
    overflow-x: auto;
    font-size: 0.9rem;
}

/* Enhanced Visual Elements for Encryption Modes */
.mode-card {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mode-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.mode-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.deterministic-icon {
    background-color: #3b82f6;
    color: white;
}

.nd-icon {
    background-color: #10b981;
    color: white;
}

.ndx-icon {
    background-color: #8b5cf6;
    color: white;
}

.mode-card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.mode-card-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
}

.feature-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #f0f9ff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.feature-text {
    font-size: 0.875rem;
}

.mode-comparison {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.mode-comparison th,
.mode-comparison td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    text-align: left;
}

.mode-comparison th {
    background-color: #f8fafc;
    font-weight: 600;
}

.mode-comparison tr:nth-child(even) {
    background-color: #f8fafc;
}

.mode-comparison .check {
    color: #10b981;
}

.mode-comparison .x {
    color: #ef4444;
}

.mode-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
}

.mode-diagram-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.mode-diagram-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.max-w-4xl {
    max-width: 56rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Code Blocks */
pre {
    background-color: var(--color-code-bg);
    border-radius: 0.25rem;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

:not(pre)>code {
    background-color: var(--color-code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="rgba(255,255,255,0.05)" width="50" height="50" x="0" y="0"></rect><rect fill="rgba(255,255,255,0.05)" width="50" height="50" x="50" y="50"></rect></svg>');
    background-size: 30px 30px;
    opacity: 0.3;
}

/* Removed diagonal background */

.hero>* {
    position: relative;
    z-index: 1;
}

/* Print Styles */
@media print {

    /* General print styles */
    body {
        font-size: 12pt;
        line-height: 1.5;
        background: #fff;
        color: #000;
    }

    /* Hide non-essential elements */
    .site-header,
    .site-footer,
    #mobile-menu,
    #mobile-menu-button,
    button {
        display: none !important;
    }

    /* Ensure content takes full width */
    .container,
    main,
    .content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Improve link display */
    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 90%;
        font-style: italic;
    }

    /* Improve table display */
    table,
    th,
    td {
        border: 1px solid #ddd !important;
    }

    table {
        page-break-inside: avoid;
        width: 100% !important;
        border-collapse: collapse;
    }

    th {
        background-color: #f0f0f0 !important;
        color: #000 !important;
    }

    /* Ensure code blocks print well */
    pre,
    code {
        background-color: #f8f8f8 !important;
        border: 1px solid #ddd !important;
        font-size: 11pt;
        page-break-inside: avoid;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
    }

    /* Ensure diagrams print well */
    .diagram-container {
        page-break-inside: avoid;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .encryption-diagram {
        border: 1px solid #000 !important;
        background-color: #fff !important;
        color: #000 !important;
        max-width: 100% !important;
        overflow: visible !important;
        white-space: pre-wrap !important;
    }

    /* Improve card display */
    .mode-card {
        page-break-inside: avoid;
        border: 1px solid #000 !important;
        margin-bottom: 20pt !important;
        padding: 10pt !important;
        background-color: #fff !important;
    }

    /* Add page breaks before major sections */
    h1,
    h2 {
        page-break-before: always;
        page-break-after: avoid;
    }

    h1:first-of-type {
        page-break-before: avoid;
    }

    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
    }

    /* Avoid breaking inside paragraphs and lists */
    p,
    ul,
    ol,
    dl,
    pre,
    blockquote,
    table,
    figure {
        page-break-inside: avoid;
    }

    /* Add URL to the top of the first page */
    @page: first {
        margin-top: 3cm;
    }

    body:before {
        content: "IPCrypt Documentation - https://ipcrypt-std.github.io/";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        text-align: center;
        font-size: 14pt;
        font-weight: bold;
        padding: 10pt 0;
        border-bottom: 1pt solid #000;
    }
}

.hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

/* Navigation */
.site-header nav a {
    position: relative;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-header nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.site-header nav a:hover::after {
    width: 100%;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

/* Sections */
section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background-color: white;
}

section:nth-child(odd) {
    background-color: var(--color-background);
}

section h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

section h2::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 3px;
}

.feature-card {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
    opacity: 0.7;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary-light);
}

.feature-card h3 {
    margin-top: 0;
    color: var(--color-primary-dark);
    font-weight: 700;
}

/* Implementation Cards */
.implementation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.implementation-card {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    display: block;
    color: var(--color-text);
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.implementation-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 24px 24px;
    border-color: transparent transparent var(--color-primary-light) transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.implementation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background-color: rgba(37, 99, 235, 0.02);
    border-color: var(--color-primary);
}

.implementation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.implementation-card:hover::before {
    opacity: 1;
}

.implementation-card:hover::after {
    opacity: 1;
}

.implementation-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--color-primary-dark);
    font-weight: 700;
}

.language-badge {
    display: inline-block;
    background-color: var(--color-code-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.language-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.language-badges-container .language-badge {
    margin-bottom: 0;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.language-badges-container .language-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.125rem;
    }
}

/* Utility Classes */
.text-primary {
    color: var(--color-primary);
}

.bg-primary {
    background-color: var(--color-primary);
}

.bg-primary-dark {
    background-color: var(--color-primary-dark);
}

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

.bg-secondary {
    background-color: var(--color-secondary);
}

.bg-secondary-dark {
    background-color: var(--color-secondary-dark);
}

/* Examples Showcase Styles - Compact Version */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.example-card {
    background: white;
    border-radius: 10px;
    padding: 1.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.example-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    border-color: #d1d5db;
}

.example-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.example-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    font-family: 'Courier New', monospace;
    margin: 0;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-blue {
    background: #1e40af;
    color: white;
}

.badge-green {
    background: #059669;
    color: white;
}

.badge-purple {
    background: #7c3aed;
    color: white;
}

.badge-orange {
    background: #ea580c;
    color: white;
}

.example-description {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 1rem;
    line-height: 1.4;
    font-weight: 500;
}

.example-samples {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sample {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    padding-right: 3.5rem;
    background: #f9fafb;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    position: relative;
    border: 1px solid #e5e7eb;
}

.sample:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.sample .input {
    color: #0f172a;
    font-weight: 700;
    min-width: 110px;
    background: #e0e7ff;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
}

.sample .arrow {
    color: #4b5563;
    font-size: 1rem;
    font-weight: bold;
}

.sample .output {
    flex: 1;
    color: #047857;
    word-break: break-all;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    font-weight: 600;
}

.sample .output.hex {
    color: #6d28d9;
    font-size: 0.825rem;
    font-weight: 600;
}

.sample .output em {
    font-style: normal;
    font-weight: 800;
    color: #047857;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-color: #047857;
    text-decoration-thickness: 2px;
}

.indicator {
    position: absolute;
    right: 0.375rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.3rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: normal;
    white-space: nowrap;
    letter-spacing: -0.025em;
}

.highlight-same {
    background: #fef3c7;
    border-color: #f59e0b;
}

.highlight-same .indicator {
    color: white;
    background: #d97706;
    border: 1px solid #92400e;
}

.highlight-prefix {
    background: #d1fae5;
    border-color: #059669;
}

.highlight-prefix .indicator {
    color: white;
    background: #059669;
    border: 1px solid #047857;
}

.highlight-different {
    background: #ede9fe;
    border-color: #7c3aed;
}

.highlight-different .indicator {
    color: white;
    background: #7c3aed;
    border: 1px solid #6d28d9;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .examples-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .example-card {
        padding: 1.25rem;
    }
    
    .sample {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .sample .input {
        min-width: 85px;
        font-size: 0.75rem;
    }
    
    .sample .output {
        font-size: 0.7rem;
    }
    
    .indicator {
        position: static;
        transform: none;
        margin-left: auto;
    }
}