body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #f4f4f4;
    color: #333;
}

.main-header {
    background-color: #ffffff;
    padding: 15px 3vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 100;
    flex-shrink: 0;
    gap: 20px; /* Added gap to create space between content-left and content-right */
}

.dark-mode .main-header {
    background-color: #2c2c2c;
    border-bottom-color: #444;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-content-left {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.site-title {
    margin: 0;
    font-size: 2.2em;
    color: #FF7F50; /* Original color */
    font-weight: bold;
}

/* Style for the link inside .site-title */
.site-title a {
    color: inherit; /* Inherit color from .site-title */
    text-decoration: none; /* Remove underline */
}

/* Hover effect for the link */
.site-title a:hover {
    color: #FF6347; /* Slightly darker orange on hover */
    text-decoration: none;
}

.dark-mode .site-title {
    color: #FFA07A; /* Original color */
}

.dark-mode .site-title a {
    color: inherit; /* Inherit color from .site-title in dark mode */
}

.dark-mode .site-title a:hover {
    color: #FF8C00; /* Slightly darker orange for dark mode hover */
}

/* New styles for header navigation */
.header-nav {
    display: flex;
    gap: 30px; /* Increased gap */
    margin-left: 30px; /* Increased margin */
}

.header-nav .nav-link {
    color: #007bff; /* Blue for links */
    text-decoration: none;
    font-size: 1em;
    font-weight: bold;
    transition: color 0.3s ease;
}

.header-nav .nav-link:hover {
    color: #0056b3; /* Darker blue on hover */
}

.dark-mode .header-nav .nav-link {
    color: #9370DB; /* Purple for links in dark mode */
}

.dark-mode .header-nav .nav-link:hover {
    color: #BA55D3; /* Lighter purple on hover in dark mode */
}


.email-address {
    font-size: 0.9em;
    color: #666;
}

.dark-mode .email-address {
    color: #bbb;
}

/* New style for the hyperlink within .email-address */
.email-address .footer-link {
    color: inherit; /* Inherit the color from its parent (.email-address) */
    text-decoration: none; /* Remove underline */
}

/* Optional: Add hover effect for the new link */
.email-address .footer-link:hover {
    text-decoration: underline; /* Add underline on hover for better UX */
}

.dark-mode .email-address .footer-link {
    color: inherit; /* Inherit color in dark mode as well */
}

.header-content-right {
    display: flex;
    align-items: center;
    gap: 25px; /* Adjusted gap */
}

.language-dropdown select {
    padding: 8px 30px 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    font-size: 1em;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2C118.5L159.2%2C246.3c-4%2C4-9.2%2C6-14.4%2C6s-10.4-2-14.4-6L5.4%2C118.5c-8.1-8.1-8.1-21.3%2C0-29.4s21.3-8.1%2C29.4%2C0l114.6%2C114.6l114.6-114.6c8.1-8.1%2C21.3-8.1%2C29.4%2C0S295.1%2C110.4%2C287%2C118.5z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.language-dropdown label {
    margin-right: 5px;
    font-size: 1em;
    color: #333;
}

.dark-mode .language-dropdown label {
    color: #eee;
}

.dark-mode .language-dropdown select {
    background-color: #3a3a3a;
    color: #fff;
    border-color: #555;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2C118.5L159.2%2C246.3c-4%2C4-9.2%2C6-14.4%2C6s-10.4-2-14.4-6L5.4%2C118.5c-8.1-8.1-8.1-21.3%2C0-29.4s21.3-8.1%2C29.4%2C0l114.6%2C114.6l114.6-114.6c8.1-8.1%2C21.3-8.1%2C29.4%2C0S295.1%2C110.4%2C287%2C118.5z%22%2F%3E%3C%2Fsvg%3E');
}

.fun-sentence {
    text-align: center;
    margin: 20px auto 0px auto;
    padding: 0 3vw;
    font-size: 1.1em;
    color: #555;
    max-width: 800px;
    flex-shrink: 0;
}

.dark-mode .fun-sentence {
    color: #ccc;
}

/* New styles for steps container */
.steps-container {
    width: 94vw; /* Matches the adsense-placeholder width */
    max-width: 1200px; /* Optional: adjust max-width as needed */
    background-color: #E6F7FF; /* Light blue background from screenshot */
    border: 1px solid #B3E0FF; /* Border color from screenshot */
    margin: 20px auto; /* Adjust margin as per desired spacing */
    padding: 15px 20px;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 20px;
    box-sizing: border-box;
    border-radius: 8px; /* Slightly rounded corners */
}

.dark-mode .steps-container {
    background-color: #0A3D62; /* Darker blue for dark mode */
    border-color: #1E90FF; /* Brighter blue border for dark mode */
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1; /* Distribute space evenly */
}

.step-number {
    background-color: #007bff; /* Blue circle from screenshot */
    color: white;
    border-radius: 50%;
    width: 25px; /* Size of the circle */
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.9em;
    flex-shrink: 0; /* Prevent number from shrinking */
}

.dark-mode .step-number {
    background-color: #6a0dad; /* Dark mode button color */
}

.step-item p {
    margin: 0;
    font-size: 0.95em;
    color: #333;
}

.dark-mode .step-item p {
    color: #eee;
}

.page-frame {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 3vw;
    padding-top: 0;
    background-color: #FFF3E0;
    box-sizing: border-box;
    overflow: hidden;
}

.main-content-wrapper {
    display: flex;
    flex-grow: 1;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    background-color: #fff;
    border: 1px solid #ddd;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #eee;
}

body.dark-mode .page-frame {
    background-color: #333;
}

body.dark-mode .main-content-wrapper {
    background-color: #222;
    border-color: #444;
}

.panel {
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.left-panel {
    width: 50%;
    background-color: #f9f9f9;
    border-right: 1px solid #eee;
}

.dark-mode .left-panel {
    background-color: #2b2b2b;
    border-right-color: #444;
}

.right-panel {
    width: 50%;
    background-color: #ffffff;
}

.dark-mode .right-panel {
    background-color: #222222;
}

textarea {
    width: 100%;
    height: 400px;
    flex-grow: 1;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    resize: vertical;
    background-color: #fff;
    color: #333;
    box-sizing: border-box;
}

.dark-mode textarea {
    background-color: #3a3a3a;
    color: #eee;
    border-color: #555;
}

#preview-output {
    flex-grow: 1;
    height: 400px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow-y: auto;
    background-color: #fff;
    color: #333;
    box-sizing: border-box;
}

.dark-mode #preview-output {
    background-color: #3a3a3a;
    color: #eee;
    border-color: #555;
}

/* Table formatting for #preview-output */
#preview-output table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9em;
    table-layout: fixed; /* Ensures columns are fixed width */
}

#preview-output th,
#preview-output td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    word-wrap: break-word; /* Ensures long words break and wrap */
}

#preview-output th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
}

.dark-mode #preview-output th {
    background-color: #444;
    color: #ddd;
}

.dark-mode #preview-output table,
.dark-mode #preview-output th,
.dark-mode #preview-output td {
    border-color: #555;
}


.input-header, .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

.dark-mode button {
    background-color: #6a0dad;
}

.dark-mode button:hover {
    background-color: #5a0bae;
}

/* New styles for info sections (About Us, Contact Us) */
.info-section {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 20px auto; /* Center and provide vertical spacing */
    max-width: 1000px; /* Adjust max-width as needed */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.dark-mode .info-section {
    background-color: #2b2b2b;
    border-color: #444;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.info-section h2 {
    color: #007bff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8em;
    text-align: center;
}

.dark-mode .info-section h2 {
    color: #9370DB; /* Purple for dark mode headers */
}

.info-section p {
    font-size: 1em;
    line-height: 1.6;
    color: #333;
    text-align: justify;
}

.dark-mode .info-section p {
    color: #eee;
}

.info-section a.contact-email-link {
    color: #007bff;
    text-decoration: underline;
    font-weight: bold;
}

.dark-mode .info-section a.contact-email-link {
    color: #BA55D3; /* Lighter purple for dark mode links */
}

/* Styling for the combined footer info div */
.combined-footer-info {
    text-align: center;
    padding: 15px;
    font-size: 0.8em;
    color: #777;
    background-color: #f4f4f4;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
    margin-top: 20px; /* Add margin to separate from new sections */
}

.dark-mode .combined-footer-info {
    background-color: #2c2c2c;
    color: #aaa;
    border-top-color: #444;
}

.dark-mode-toggle-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 18px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:focus + .slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .slider:before {
    -webkit-transform: translateX(16px);
    -ms-transform: translateX(16px);
    transform: translateX(16px);
}

body.dark-mode .slider {
    background-color: #555;
}

body.dark-mode input:checked + .slider {
    background-color: #66BB6A;
}

/* New styles for sample image section */
.sample-section {
    text-align: center;
    margin: 30px auto; /* Adjust margin as needed */
    padding: 0 3vw;
    max-width: 1200px; /* Max width to match main content */
    box-sizing: border-box;
}

.sample-section h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 20px;
}

.dark-mode .sample-section h2 {
    color: #eee;
}

.sample-image {
    max-width: 100%; /* Ensure image is responsive */
    height: auto;
    border: 1px solid #ddd; /* Optional: add a border */
    border-radius: 8px; /* Optional: rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional: add a subtle shadow */
}

.dark-mode .sample-image {
    border-color: #555;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .page-frame {
        padding: 0 2vw;
        padding-top: 0;
    }

    .main-content-wrapper {
        flex-direction: column;
        overflow-y: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .left-panel,
    .right-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 15px;
        box-sizing: border-box;
    }

    body.dark-mode .left-panel,
    body.dark-mode .right-panel {
        border-right-color: transparent;
        border-bottom-color: #444;
    }

    .left-panel {
        border-bottom: none;
    }

    .right-panel {
        border-top: none;
    }

    textarea,
    #preview-output {
        height: 250px;
        width: 100%;
        box-sizing: border-box;
    }

    .steps-container {
        flex-direction: column; /* Stack steps vertically on smaller screens */
        padding: 15px;
    }

    .step-item {
        flex-direction: row; /* Keep number and text side-by-side */
        align-items: flex-start;
        width: 100%;
    }

    .sample-section {
        margin: 20px auto;
        padding: 0 2vw;
    }
    .sample-section h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .panel {
        padding: 10px;
    }

    button {
        font-size: 14px;
        padding: 8px 12px;
    }
    .main-header {
        flex-wrap: wrap; /* Allow items to wrap */
        align-items: flex-start;
        gap: 10px; /* Vertical gap between wrapped items */
    }
    .header-content-left {
        flex-wrap: wrap; /* Allow wrapping within this container */
        align-items: flex-start;
        gap: 10px;
        width: 100%; /* Take full width for wrapping */
    }
    .site-title {
        font-size: 1.8em;
    }
    .header-nav {
        margin-left: 0; /* Remove left margin when wrapped to save space */
        width: 100%; /* Ensure nav takes full width for easier wrapping */
        justify-content: center; /* Center nav items when wrapped */
        gap: 20px; /* Adjust gap for nav links if needed on small screens */
        margin-top: 10px; /* Add some space if title wraps */
    }
    .header-content-right {
        width: 100%;
        justify-content: center; /* Center language and dark mode when wrapped */
        margin-top: 10px; /* Add some space if previous section wraps */
        gap: 20px; /* Maintain good gap for language and dark mode */
    }
    .fun-sentence {
        font-size: 1em;
        margin: 15px auto 0px auto;
    }
    .steps-container {
        padding: 10px; /* Adjust padding for very small screens */
        margin: 15px auto;
        max-width: 100%;
    }
    .sample-section {
        margin: 15px auto;
        padding: 0 1vw;
    }
    .sample-section h2 {
        font-size: 1.3em;
    }
}