body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header span {
    margin: 0;
    display: flex;
    align-items: center;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

header .logo {
    background-color: transparent;
    height: 45px;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

header .logo:hover {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    margin: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.login a {
    color: white;
    text-decoration: none;
}

main {
    max-width: 1200px;
    min-height: 680px;
    margin: 30px auto;
    padding: 0 20px;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 25px 0;
    position: relative;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    margin: 0 15px;
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #3498db;
}

textarea {
    height: 96%;
    margin-bottom: 1px;
    font-size: 16px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: 'Consolas', 'Monaco', monospace;
    resize: none;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: inset 0 1px 3px rgba(52, 152, 219, 0.3);
}

.content {
    flex: 1;
    padding: 20px;
}

pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    border: 1px solid #e0e0e0;
}

#imgPreviewContainer {
    margin: 15px 0;
}

#imgPreview {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button {
    padding: 12px 24px;
    font-size: 16px;
    margin: 10px 10px 10px 0;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.main-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 700px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

@media (min-width: 992px) {
    .main-container {
        flex-direction: row;
    }
    
    .button-container {
        flex-direction: row;
        justify-content: center;
    }
}

.left-panel, .right-panel {
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 8px;
    margin: 15px;
}

.left-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: #f8f9fa;
    border: 2px dashed #ccc;
    position: relative;
    transition: border-color 0.3s ease;
}

.left-panel:hover {
    border-color: #3498db;
}

.left-panel img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: none;
    border-radius: 6px;
}

.left-panel p {
    margin: 0;
    padding: 0;
    color: #666;
    font-size: 18px;
}

.left-panel input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.right-panel {
    background-color: #f8f9fa;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.right-panel img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    gap: 10px;
}

#header {
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
}

#header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 0.5em;
    font-weight: 700;
}

#header .description {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 1.5em;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    max-width: 800px;
}

.language-selector {
    align-self: start;
    display: flex;
    margin-top: 5px;
    gap: 6px;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 150%;
}

@media (max-width: 991px) {
    .language-selector {
        white-space: initial;
    }
}

.language-name {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    flex-grow: 1;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.language-name:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.language-name img {
    margin-left: 5px;
    width: 12px;
    height: 12px;
}

.language-icon {
    aspect-ratio: 1;
    object-fit: auto;
    object-position: center;
    width: 60px;
    align-self: start;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 6px;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.lang-dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.lang-dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #3498db;
}

.lang-dropdown:hover .lang-dropdown-content {
    display: block;
}

.section-container {
    background-color: #fff;
    padding: 30px;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-container h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.section-container h3 {
    color: #34495e;
    font-size: 1.4em;
    margin-top: 25px;
    margin-bottom: 15px;
}

.section-container p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
}

.faq {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    margin-bottom: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-left: 4px solid #3498db;
}

.faq:hover {
    background-color: #eef2f7;
}

.question {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.answer {
    display: none;
    padding: 15px;
    background-color: #fff;
    margin-bottom: 15px;
    border-radius: 6px;
    color: #555;
    line-height: 1.7;
    border-left: 4px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.icon {
    color: #3498db;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.faq.open .icon {
    transform: rotate(180deg);
}

.faq.open + .answer {
    display: block;
}

.step-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.step {
    flex: 1;
    min-width: 250px;
    display: flex;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid #3498db;
}

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

.step-icon {
    font-size: 2.5em;
    margin-right: 15px;
    color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(52, 152, 219, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.text {
    flex: 1;
}

.text strong {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 1.2em;
}

.text p {
    color: #555;
    margin: 0;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Header container adjustments */
    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
        position: relative;
        height: 60px;
    }
    
    /* Hide desktop nav on mobile */
    nav {
        display: none;
    }
    
    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1002;
    }
    
    .mobile-menu-toggle span {
        width: 30px;
        height: 3px;
        background: white;
        border-radius: 10px;
        transition: all 0.3s linear;
        position: relative;
        transform-origin: 1px;
    }
    
    /* Mobile nav overlay */
    nav.active {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100%;
        height: calc(100vh - 60px);
        background: linear-gradient(135deg, #2c3e50, #3498db);
        display: block;
        padding: 15px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1001;
        box-sizing: border-box;
    }
    
    nav.active ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
        list-style: none;
    }
    
    nav.active ul li {
        margin-bottom: 8px;
        width: 100%;
        box-sizing: border-box;
    }
    
    nav.active ul li a {
        width: 100%;
        display: block;
        padding: 12px 16px;
        text-align: left;
        color: white;
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.3s ease;
        font-size: 15px;
        background-color: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-sizing: border-box;
    }
    
    nav.active ul li a:hover {
        background-color: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }
    
    /* Mobile dropdown styles - using more specific selectors */
    nav.active .tools-dropdown-content {
        position: static !important;
        display: block !important;
        box-shadow: none !important;
        background-color: rgba(0, 0, 0, 0.15) !important;
        border-radius: 8px !important;
        margin-top: 8px !important;
        padding: 8px !important;
        width: 100% !important;
        min-width: auto !important;
        left: auto !important;
        top: auto !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-sizing: border-box !important;
    }
    
    /* Hide tools dropdown when language dropdown is active */
    nav.active .lang-dropdown.active ~ .tools-dropdown .tools-dropdown-content {
        display: none !important;
    }
    
    nav.active .tools-dropdown-content a {
        color: white !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
        border-radius: 6px !important;
        margin: 4px 0 !important;
        background-color: rgba(255, 255, 255, 0.08) !important;
        display: block !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        box-sizing: border-box !important;
    }
    
    nav.active .tools-dropdown-content a:hover {
        background-color: rgba(255, 255, 255, 0.15) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
        color: white !important;
        transform: translateY(-1px) !important;
    }
    
    .tools-dropdown > a {
        justify-content: space-between;
        width: 100%;
    }
    
    /* Mobile language dropdown - using more specific selectors */
    nav.active .lang-dropdown-content {
        position: static !important;
        width: 100% !important;
        grid-template-columns: repeat(2, 1fr) !important;
        display: none !important;
        margin-top: 8px !important;
        box-shadow: none !important;
        background-color: rgba(0, 0, 0, 0.15) !important;
        border-radius: 8px !important;
        padding: 8px !important;
        gap: 6px !important;
        right: auto !important;
        top: auto !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-sizing: border-box !important;
    }
    
    nav.active .lang-dropdown.active .lang-dropdown-content {
        display: grid !important;
    }
    
    nav.active .lang-dropdown-content a {
        color: white !important;
        padding: 8px 6px !important;
        font-size: 12px !important;
        text-align: center !important;
        border-radius: 6px !important;
        background-color: rgba(255, 255, 255, 0.08) !important;
        transition: all 0.3s ease !important;
        text-decoration: none !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        box-sizing: border-box !important;
    }
    
    nav.active .lang-dropdown-content a:hover {
        background-color: rgba(255, 255, 255, 0.15) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
        color: white !important;
        transform: translateY(-1px) !important;
    }
    
    .language-name {
        justify-content: space-between;
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .lang-dropdown {
        width: 100%;
    }
    
    /* Mobile language selector positioning */
    .mobile-language-selector {
        display: block;
        margin-top: 15px;
        width: 100%;
    }
    
    .desktop-language-selector {
        display: none;
    }
    
    /* Fix for hover states on mobile */
    .tools-dropdown:hover .tools-dropdown-content,
    .lang-dropdown:hover .lang-dropdown-content {
        display: none;
    }
    
    /* Logo adjustments */
    header span {
        font-size: 20px;
    }
    
    header .logo {
        height: 35px;
        margin-right: 10px;
    }
    
    /* Content adjustments */
    .step-container {
        flex-direction: column;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .button-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    button {
        margin: 5px 0;
    }
}

/* Additional mobile optimizations for smaller screens */
@media (max-width: 480px) {
    header .container {
        padding: 0 10px;
        height: 55px;
    }
    
    header span {
        font-size: 18px;
    }
    
    header .logo {
        height: 30px;
        margin-right: 8px;
    }
    
    .mobile-menu-toggle {
        width: 25px;
        height: 20px;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 2px;
    }
    
    nav.active {
        top: 55px;
        height: calc(100vh - 55px);
        padding: 15px;
    }
    
    nav.active ul li a {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    nav.active .tools-dropdown-content a {
        padding: 8px 15px !important;
        font-size: 13px !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    nav.active .lang-dropdown-content {
        grid-template-columns: repeat(3, 1fr) !important;
        padding: 8px !important;
        gap: 3px !important;
        background-color: rgba(0, 0, 0, 0.2) !important;
    }
    
    nav.active .lang-dropdown-content a {
        padding: 8px 6px !important;
        font-size: 12px !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .language-name {
        padding: 12px 15px;
        font-size: 15px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    nav.active {
        height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .lang-dropdown-content {
        grid-template-columns: repeat(4, 1fr);
        max-height: 200px;
        overflow-y: auto;
    }
}

/* Custom select styling */
select {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 16px;
    color: #333;
    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%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%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%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
    padding-right: 30px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Label styling */
label {
    font-weight: 600;
    margin-right: 10px;
    color: #2c3e50;
}


