body {
    /* Global page styling */
    background: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #343a40;
}

/* Header styling */
h1 {
    font-size: 2.5rem;
    margin: 20px 0;
    text-align: center;
    color: #212529;
}

/* Section styling */
section {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px auto;
    transition: transform 0.3s ease;
}

section:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Button enhancements */
.btn {
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border-radius: 4px;
}

.btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

li {
    padding: 2px;
    margin: 12px 0;
    line-height: 1.6;
}

/* Editor containers */
#editor,
#result_editor {
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    margin: 20px !important;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.3s ease;
    font-size: 10px;
    line-height: 1.6;
    resize: vertical;
    min-height: 400px;
}

#editor:hover,
#result_editor:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Main content area styling */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Form elements */
.form-check {
    margin: 8px 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 15px;
    min-width: 200px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-check:hover {
    border-color: #0d6efd;
    background: #e9ecef;
    transform: translateX(5px);
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #0d6efd;
}

.form-check-label {
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

/* Typography improvements */
h2 {
    color: #1a1a1a;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

h4 {
    color: #2c3e50;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

ul {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px 40px;
}

/* Button improvements */
.btn-primary {
    padding: 8px 24px;
    font-weight: 500;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    font-size: 14px;
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Code example styling */
code,
pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
}

/* Example block styling */
.example-block {
    background: #f1f3f5;
    border-left: 4px solid #0d6efd;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

/* Options panel styling */
.controls-wrapper {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 600px;
    background: linear-gradient(to right bottom, #ffffff, #f8f9fa);
    border: 1px solid #e9ecef;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.options-group {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 10px;
}

.checkboxes-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 25px;
    border-right: 2px solid rgba(0, 0, 0, 0.1);
}

#convert-btn {
    min-width: 120px;
    padding: 12px 24px;
    background: linear-gradient(45deg, #0d6efd, #0b5ed7);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: auto !important;
    margin: 0 0 0 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

#convert-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.6s;
}

#convert-btn:active::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Copy button positioning */
#copy-btn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #dee2e6;
    color: #0d6efd;
    transition: all 0.2s ease;
}

#copy-btn:hover {
    background: #0d6efd;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

/* Editor container positioning */
.editor-container {
    position: relative;
    padding-right: 50px;
    transition: transform 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.editor-container:hover {
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {

    #editor,
    #result_editor {
        min-width: 300px !important;
    }

    section {
        margin: 10px;
        padding: 15px;
    }
}

/* Documentation styling improvements */
.doc-section li {
    position: relative;
    padding-left: 25px;
}

.doc-section li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: #0d6efd;
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1d20;
        color: #e9ecef;
    }

    section {
        background: #242729;
        border: 1px solid #373b3e;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .controls-wrapper {
        background: linear-gradient(135deg, #242729 0%, #1a1d20 100%);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        border-color: #373b3e;
    }

    .form-check {
        background: #2a2d30;
        border-color: #373b3e;
    }

    .form-check:hover {
        background: linear-gradient(135deg, #323538 0%, #2a2d30 100%);
        border-color: #0d6efd;
    }

    .form-check-label {
        color: #dee2e6;
    }

    h1,
    h2,
    h4 {
        color: #f8f9fa;
    }

    #copy-btn {
        background: #242729;
        border-color: #373b3e;
        color: #0d6efd;
    }

    #copy-btn:hover {
        background: #0d6efd;
        color: #fff;
    }

    ul {
        background: #2a2d30;
    }

    .example-block {
        background: #2a2d30;
        border-left-color: #0d6efd;
    }

    code,
    pre {
        background: #1a1d20;
        color: #e9ecef;
    }

    #editor,
    #result_editor {
        border-color: #373b3e;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .btn-primary {
        background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    }

    .doc-section li:before {
        color: #0d6efd;
    }

    /* Improve text contrast in dark mode */
    span[style*="color: black"] {
        color: #e9ecef !important;
    }

    /* Smooth transition between light/dark modes */
    * {
        transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    }

    [data-tooltip]:hover::before {
        background: rgba(0, 0, 0, 0.95);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    .checkboxes-group {
        border-right-color: rgba(255, 255, 255, 0.1);
    }
}

/* Enhanced accessibility and focus states */
:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
}

/* Loading state */
.loading {
    position: relative;
    opacity: 0.8;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: loading 0.6s linear infinite;
}

@keyframes loading {
    to {
        transform: rotate(360deg);
    }
}

/* Improved tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 13px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: tooltip-fade 0.2s ease-out forwards;
}

@keyframes tooltip-fade {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Responsive tooltip adjustments */
@media (max-width: 768px) {
    [data-tooltip]:hover::before {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

/* Selection styling */
::selection {
    background: rgba(13, 110, 253, 0.2);
    color: inherit;
}

/* Button styles */
.bmc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: #FFDD00;
    color: #000000;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    white-space: nowrap;
}

.bmc-button:hover {
    width: auto;
    padding: 0 24px;
    gap: 8px;
    border-radius: 30px;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.bmc-text {
    width: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.bmc-button:hover .bmc-text {
    width: auto;
    opacity: 1;
    margin-left: 8px;
}

.bmc-button img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Keep original BMC button styles */
.bmc-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.bmc-button {
    background-color: #FFDD00;
    color: #000000;
}

/* Documentation Section Styling */
.documentation {
    max-width: 1200px;
    margin: 50px auto;
    padding: 40px 20px;
}

.section-title {
    font-size: 2.5rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #0d6efd;
    margin: 15px auto;
    border-radius: 2px;
}

.tool-description .lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #495057;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

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

.feature-card h4 {
    color: #0d6efd;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.feature-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-list li::before {
    content: '→';
    color: #0d6efd;
}

.code-example {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-example pre {
    margin: 0;
    white-space: pre-wrap;
}

.code-example code {
    color: #e9ecef;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
}

/* Dark mode adjustments for documentation */
@media (prefers-color-scheme: dark) {
    .feature-card {
        background: #242729;
        border-color: #373b3e;
    }

    .tool-description .lead {
        color: #e9ecef;
    }

    .feature-card h4 {
        color: #6ea8fe;
        border-bottom-color: #373b3e;
    }

    .feature-list li::before {
        color: #6ea8fe;
    }

    .section-title {
        color: #f8f9fa;
    }

    .section-title::after {
        background: #6ea8fe;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .documentation {
        padding: 20px;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Enhanced Documentation Styling */
.quick-start {
    background: linear-gradient(to right bottom, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 30px;
    margin-top: 3rem;
    border: 1px solid #dee2e6;
}

.quick-start h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.steps-list {
    counter-reset: steps;
    list-style: none;
    padding: 0;
}

.steps-list li {
    position: relative;
    padding-left: 45px;
    margin-bottom: 1rem;
    counter-increment: steps;
}

.steps-list li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.feature-icon {
    background: rgba(13, 110, 253, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #0d6efd;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    background: #0d6efd;
    color: white;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .quick-start {
        background: linear-gradient(to right bottom, #242729, #1a1d20);
        border-color: #373b3e;
    }

    .quick-start h3 {
        color: #e9ecef;
    }

    .feature-icon {
        background: rgba(13, 110, 253, 0.2);
    }

    .steps-list li::before {
        background: #0d6efd;
        color: #e9ecef;
    }
}

/* Support Section Styling */
.support-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.support-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: center;
}

.feedback-container,
.donation-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feedback-container:hover,
.donation-container:hover {
    transform: translateY(-5px);
}

.feedback-container h3,
.donation-container h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.feedback-container p,
.donation-container p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.donation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

.github-sponsor {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #db61a2;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.github-sponsor:hover {
    background: #bf4b8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(219, 97, 162, 0.3);
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {

    .feedback-container,
    .donation-container {
        background: #242729;
        border: 1px solid #373b3e;
    }

    .feedback-container h3,
    .donation-container h3 {
        color: #e9ecef;
    }

    .feedback-container p,
    .donation-container p {
        color: #adb5bd;
    }
}

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

    .donation-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* Enhanced Navbar Styling */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d6efd !important;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: translateX(5px);
}

.navbar-nav {
    gap: 1rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-weight: 500;
    color: #495057 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #0d6efd !important;
    background: rgba(13, 110, 253, 0.1);
}

.nav-link.active {
    color: #0d6efd !important;
    background: rgba(13, 110, 253, 0.1);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0d6efd;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover::after {
    width: 100%;
}

/* Dark mode navbar adjustments */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: rgba(26, 29, 32, 0.95) !important;
    }

    .navbar.scrolled {
        background: rgba(26, 29, 32, 0.98) !important;
    }

    .nav-link {
        color: #e9ecef !important;
    }

    .nav-link:hover {
        color: #6ea8fe !important;
        background: rgba(13, 110, 253, 0.15);
    }

    .nav-link.active {
        color: #6ea8fe !important;
        background: rgba(13, 110, 253, 0.15);
    }
}

/* Responsive navbar adjustments */
@media (max-width: 991px) {
    .navbar-collapse {
        background: inherit;
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
    }

    .nav-item::after {
        display: none;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
    }
}