body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    width: 90%;
    max-width: 800px;
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
}

h1 {
    color: #1e90ff;
    margin-bottom: 10px;
}

p {
    color: #b0b0b0;
    margin-bottom: 30px;
}

.tool {
    background-color: #2a2a2a;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.input-section {
    margin-bottom: 25px;
}

.custom-file-upload {
    background-color: #1e90ff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    transition: background-color 0.3s;
}

.custom-file-upload:hover {
    background-color: #0073e6;
}

input[type="file"] {
    display: none;
}

#fileName {
    margin-left: 15px;
    color: #c0c0c0;
}

.options-section h2 {
    font-size: 1.2em;
    color: #e0e0e0;
    margin-bottom: 15px;
}

.radio-group {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    background-color: #333;
    color: #ccc;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.radio-group input[type="radio"]:checked + label {
    background-color: #1e90ff;
    color: #fff;
}

#convertBtn {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

#convertBtn:hover {
    background-color: #218838;
}

.output-section h2 {
    color: #1e90ff;
}

.image-preview-container {
    min-height: 200px;
    background-color: #2a2a2a;
    border: 2px dashed #444;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
}

.image-preview-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 5px;
}

.download-btn {
    background-color: #1e90ff;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #0073e6;
}

.output-info {
    margin-bottom: 20px;
    color: #c0c0c0;
    font-size: 1em;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.output-info span {
    background-color: #2a2a2a;
    padding: 8px 15px;
    border-radius: 5px;
}

/* Tool Menu */
#tool-menu ul {
    list-style: none;
    padding: 0;
}

#tool-menu li a {
    display: block;
    background-color: #2a2a2a;
    color: #1e90ff;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

#tool-menu li a:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* Tool Sections */
.tool-section {
    display: none; /* Ocultar herramientas por defecto */
}

.tool-section.active {
    display: block; /* Mostrar la herramienta activa */
}

.back-to-menu {
    background: none;
    border: 1px solid #1e90ff;
    color: #1e90ff;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    display: block;
    margin-bottom: 20px;
    text-align: left;
}

.back-to-menu:hover {
    background-color: #1e90ff;
    color: #fff;
}

/* Language Switcher */
#lang-switcher {
    position: absolute;
    top: 15px;
    right: 15px;
}

#lang-switcher select {
    background-color: #333;
    color: #ccc;
    border: 1px solid #555;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    appearance: none; /* Remove default select arrow */
    -webkit-appearance: none;
    -moz-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%23cccccc%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13.2-6.4H18.4c-5%200-9.3%201.8-12.9%205.4s-5.4%207.8-5.4%2012.8c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095.1c3.6-3.5%205.4-7.8%205.4-12.8%200-5-1.8-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px; /* Make space for the arrow */
}

#lang-switcher select:focus {
    outline: none;
    border-color: #1e90ff;
}

#lang-switcher option {
    background-color: #333;
    color: #ccc;
}

#main-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#logo {
    width: 80px; /* Adjust size as needed */
    height: 80px; /* Adjust size as needed */
    margin-bottom: 10px;
}

.ko-fi-button {
    display: inline-flex;
    align-items: center;
    background-color: #FF5E5E; /* Ko-fi red */
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px; /* Space from description */
    transition: background-color 0.3s ease;
}

.ko-fi-button:hover {
    background-color: #e04a4a;
}

.ko-fi-button img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border: none; /* Remove any default image border */
    fill: currentColor; /* Make SVG inherit text color */
}

#koFiButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000; /* Ensure it's above other content */
    display: none; /* Hidden by default, controlled by JS */
}

/* Watermark Section Styles */
.watermark-details {
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
}

.watermark-details summary {
    font-size: 1.2em;
    font-weight: bold;
    color: #1e90ff;
    cursor: pointer;
    padding: 5px 0;
}

.watermark-details .watermark-options {
    padding-top: 15px;
    border-top: 1px solid #333;
    margin-top: 15px;
}

.watermark-details .options-section h3 {
    font-size: 1em;
    color: #e0e0e0;
    margin-bottom: 10px;
    margin-top: 20px;
}

.watermark-details .radio-group {
    justify-content: flex-start;
}

.watermark-details .radio-group label {
    padding: 6px 12px;
    font-size: 0.9em;
}

.watermark-details .input-section {
    margin-bottom: 15px;
}

.watermark-details #watermarkFileName {
    margin-left: 10px;
    font-size: 0.9em;
}

.watermark-position-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 120px; /* Adjust as needed */
    height: 120px; /* Adjust as needed */
    border: 2px solid #1e90ff;
    margin: 20px auto;
    position: relative;
}

.watermark-position-selector .pos-btn {
    background-color: #333;
    border: 1px solid #555;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    width: 30px;
    height: 30px;
    position: absolute;
}

.watermark-position-selector .pos-btn:hover {
    background-color: #444;
}

.watermark-position-selector .pos-btn.active {
    background-color: #1e90ff;
    border-color: #1e90ff;
}

.watermark-position-selector .pos-btn.top-left {
    top: 8px;
    left: 8px;
}

.watermark-position-selector .pos-btn.top-right {
    top: 8px;
    right: 8px;
}

.watermark-position-selector .pos-btn.bottom-left {
    bottom: 8px;
    left: 8px;
}

.watermark-position-selector .pos-btn.bottom-right {
    bottom: 8px;
    right: 8px;
}

.remove-btn {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    margin-top: 10px;
    margin-left: 0;
}

.remove-btn:hover {
    background-color: #c82333;
}

/* URL Converter Output */
.converted-url-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2a2a2a;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.url-text {
    color: #e0e0e0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 15px;
}

.copy-btn {
    background-color: #1e90ff;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #0073e6;
}

/* URL Converter Input */
.url-input-section {
    flex-direction: column;
    align-items: stretch;
}

.url-input-section label {
    margin-bottom: 10px;
    font-weight: bold;
    color: #e0e0e0;
    text-align: left;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #e0e0e0;
    font-size: 1em;
    box-sizing: border-box; /* To include padding and border in the width */
}

input[type="text"]:focus {
    outline: none;
    border-color: #1e90ff;
}

/* History Section */
.history-section {
    margin-top: 40px;
    text-align: left;
}

.history-section h3 {
    color: #1e90ff;
    margin-bottom: 15px;
}

#history-list {
    list-style: none;
    padding: 0;
}

#history-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2a2a2a;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

#history-list .history-item-link {
    color: #e0e0e0;
    text-decoration: none;
    cursor: pointer;
    flex-grow: 1;
    margin-right: 15px;
}

#history-list .history-item-link:hover {
    color: #1e90ff;
}

.delete-history-btn {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-history-btn:hover {
    background-color: #c82333;
}