* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background-color: #31bb9a;
    border-bottom: 1px solid #31bb9a;
    padding: 15px 0;
}

.header-content {
    width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-area {
    display: flex;
    align-items: center;
}

.title-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Language Selector Styles */
.language-selector {
    margin-left: auto;
    position: relative;
}

.language-toggle {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.language-toggle i {
    font-size: 12px;
    transition: transform 0.2s;
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 2px;
    margin-top: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 100;
    list-style-type:none;
    font-size:15px;
}

.language-dropdown:hover .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown:hover .language-toggle i {
    transform: rotate(180deg);
}

.language-menu li a {
    display: block;
    padding: 4px 12px;
    color: #333;
    text-decoration: none;
}

.language-menu li a:hover {
    background-color: #31bb9a;
    color: white;
}

@media (max-width: 768px) {
    .language-toggle {
        padding: 8px 15px;
        font-size: 14px;
    }
}

.l_title {
    font-weight: 700;
    font-family: 'Ubuntu Condensed', sans-serif;
    text-shadow: -1px -1px 0 rgba(0, 0, 0, .3);
    text-decoration: none;
    color: #fff;
    font-size: 2em;
    line-height: 1;
}

.slogan {
    color: #fff;
    font-size: 15px;
    line-height: 1.6;
}

.highlight {
    color: #FFEF5E;
}

.emphasis {
    font-style: italic;
    text-transform: uppercase;
}

.main-content {
    width: 1000px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.compression-control {
    background-color: #e2ffea;
    padding: 5px;
    border-radius: 10px;
}

.compression-control table {
    width: 100%;
}

.compression-label {
    width: 25%;
    text-align: right;
    color: #31bb9a;
    font-family: 'Ubuntu Condensed', sans-serif;
    padding-right: 15px;
}

.compression-slider {
    width: 50%;
}

.compression-value {
    width: 25%;
    font-size: 2em;
    color: #31bb9a;
    font-family: 'Ubuntu Condensed', sans-serif;
    padding-left: 15px;
}

.image-processing {
    margin: 20px 0;
}

.images-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.image-section {
    width: 300px;
}

.control-section {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-upload,
.mobile-download {
    display: none;
    text-align: center;
}

.control-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 39px;
}

.format-info {
    text-align: center;
    color: #51555a !important;
    font-size: 13px;
    font-style: italic;
    font-weight: 500;
}

.control-buttons .format-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -30px;
}

.control-buttons {
    position: relative;
}

@media (max-width: 1020px) {
    .mobile-upload {
        display: block;
    }

    .mobile-download {
        display: block;
        margin-top: 20px;
    }

    .control-buttons .button-wrapper,
    .control-buttons .mybt,
    .control-section .format-info {
        display: none;
    }

    .ad-space {
        margin-bottom: 20px;
    }

    .mobile-download .mybt {
        display: inline-block;
    }
}

.button-wrapper {
    position: relative;
    overflow: hidden;
}

.button-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0;
    cursor: pointer;
}

.btn-file-input, .mybt {
    background-color: #31bb9a;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    min-width: 120px;
    text-align: center;
}

.btn-file-input:hover, .mybt:hover {
    color: #fff;
}

.ad-space {
    width: 100%;
    min-height: 250px;
    background-color: #f5f5f5;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-top: auto;
}

.image-title {
    text-align: center;
    font-size: 1.1em;
    font-weight: 700;
    color: #51555a;
    margin-bottom: 5px;
}

.image-size {
    text-align: center;
    font-size: 0.9em;
    color: #51555a;
    margin-bottom: 10px;
    min-height: 20px;
}

.image-box {
    border: 6px solid #e6e6e6;
    height: 380px;
    padding: 15px;
    text-align: center;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.file-size {
    text-align: center;
    font-size: 0.9em;
    color: #31bb9a;
    margin-bottom: 5px;
}

.compressed_img {
    width: 260px;
    height: auto;
}

.file-preview, .result-preview {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: auto;
    border: 1px solid #ddd;
    padding: 10px;
    box-sizing: border-box;
}

.instructions {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.instruction-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.instructions ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.instructions ol li {
    font-size: 17px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.faq-table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.faq-table td {
    padding: 10px;
    font-size: 0.9em;
    vertical-align: top;
}

.footer-note {
    font-size: 16px;
    line-height: 1.8;
    padding-top: 0px;
    opacity: 0.7
}

.footer {
    background-color: #31bb9a;
    border-top: 1px solid #31bb9a;
    padding: 15px 0;
    margin-top: auto;
}

.footer-content {
    width: 1000px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
    font-size: 0.9em;
}

.footer-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

#various_message {
    text-align: center;
    margin: 10px 0;
    color: #f44336;
    font-size: 0.9em;
}

.form-range {
    width: 100%;
    height: 1rem;
    padding: 0;
    background-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.form-range::-webkit-slider-thumb {
    width: 1.5rem;
    height: 1.5rem;
    margin-top: -0.25rem;
    border: 0;
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, .1);
    -webkit-appearance: none;
}

.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 1rem;
    color: transparent;
    cursor: pointer;
    background-color: #31bb9a;
    border-color: transparent;
    border-radius: 1rem;
}

.dl_box_right {
    margin: 15px 0;
    text-align: center;
}

.clr {
    clear: both;
}

.terms-privacy-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.terms-privacy-content h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

.terms-privacy-content h2 {
    color: #31bb9a;
    font-size: 1.5em;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #31bb9a;
}

.terms-privacy-content h3 {
    color: #51555a;
    font-size: 1.2em;
    margin: 20px 0 10px;
}

.terms-section, .privacy-section {
    margin-bottom: 40px;
}

.terms-content, .privacy-content {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.terms-privacy-content ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

.terms-privacy-content li {
    margin-bottom: 8px;
    color: #51555a;
}

.terms-privacy-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #51555a;
}

.back-to-home {
    text-align: center;
    margin: 40px 0;
}

.btn-back {
    display: inline-block;
    background-color: #31bb9a;
    color: #fff;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: #31bb9a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1020px) {
    .header-content,
    .main-content,
    .footer-content {
        width: 95%;
        padding: 10px;
    }

    .images-container {
        flex-direction: column;
        align-items: center;
    }

    .image-section,
    .control-section {
        width: 100%;
        max-width: 320px;
    }

    .faq-table {
        display: block;
    }

    .faq-table tr {
        display: flex;
        flex-direction: column;
    }

    .faq-table td {
        display: block;
        margin-bottom: 10px;
    }

    .compression-control {
        padding: 0 10px;
        position: relative;
    }

    .compression-control table tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }

    .compression-label {
        width: 100%;
        text-align: center;
        order: 1;
    }

    .compression-slider {
        flex: 1;
        order: 2;
        padding: 0 10px;
        position: relative;
    }

    .compression-value {
        width: auto;
        text-align: right;
        padding: 5px 0;
        order: 3;
        font-size: 1.5em;
    }

    .compression-slider::before,
    .compression-slider::after {
        content: attr(data-original-size);
        position: absolute;
        bottom: -20px;
        font-size: 0.8em;
        color: #666;
    }

    .compression-slider::before {
        left: 10px;
    }

    .compression-slider::after {
        right: 10px;
        content: attr(data-compressed-size);
    }

    .mobile-download {
        order: 2;
        margin-top: 10px;
    }

    .image-section:last-child {
        display: flex;
        flex-direction: column;
    }

    .image-section:last-child .image-box {
        order: 1;
    }

    .image-section:last-child + .mobile-download {
        order: 2;
        margin-top: 15px;
    }

    .control-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin: 0;
    }

    .button-wrapper {
        order: -1;
        margin-bottom: 8px;
    }

    .control-section {
        display: flex;
        flex-direction: column;
    }

    .mybt {
        order: 1;
        margin: 20px 0 0 50px;
    }

    .ad-space {
        order: 0;
        margin: 20px 0;
    }
}

#holder, #compressed_result {
    overflow: auto;
    max-height: 500px;
    border: 3px solid #ddd;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #31bb9a #f0f0f0;
}

#holder {
    border-style: dashed;
}

#holder::-webkit-scrollbar,
#compressed_result::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#holder::-webkit-scrollbar-track,
#compressed_result::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

#holder::-webkit-scrollbar-thumb,
#compressed_result::-webkit-scrollbar-thumb {
    background-color: #31bb9a;
    border-radius: 4px;
}

#holder::-webkit-scrollbar-thumb:hover,
#compressed_result::-webkit-scrollbar-thumb:hover {
    background-color: #31bb9a;
}

.download-all-btn {
    padding: 6px 12px;
    background-color: rgb(49, 187, 154);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-family: Arial, sans-serif;
    transition: background-color 0.3s;
    position: sticky;
    top: 0;
    z-index: 100;
}

.compressed_img {
    width: 260px;
    height: auto;
}

.features-section {
    padding: 25px 0;
    background: #f9f9f9;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding: 0 20px;
}

.feature-box {
    flex: 0 0 calc(33.33% - 20px);
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-box img {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
}

.feature-box h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.feature-box p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.faq-section {
    margin: 0 auto;
    padding: 0 20;
    max-width: 1000px;
}

.faq-section h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.faq-section details {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    background: white;
}

.faq-section summary {
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.faq-section summary:hover {
    background-color: #f5f5f5;
}

.faq-section summary span {
    flex-grow: 1;
}

.faq-section .arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    fill: #31bb9a;
}

.faq-section details[open] .arrow-icon {
    transform: rotate(180deg);
}

.faq-section details[open] summary {
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.faq-content {
    padding: 20px;
    line-height: 1.6;
    color: #666;
}

.faq-content p {
    margin: 0;
    font-size: 15px;
}

.text-h1 {
    text-align:center;
    margin-bottom:20px;
}

.text-h1 h1{
    font-size: 27px !important;
    font-weight: 700;
}

.text-h1 p {
    font-size: 17px !important;
    line-height: 30px !important;
    color:#51555a;
}

@media (max-width: 768px) {
    .feature-box {
        flex: 0 0 100%;
    }

    .text-h1 h1{
        font-size: 22px !important;
    }

    .text-h1 p {
        font-size: 15px !important;
        line-height: 27px !important;
    }

    .faq-section {
        padding: 0 15px;
        margin: 40px auto;
    }
    
    .faq-section summary {
        padding: 10px;
    }
    
    .faq-content {
        padding: 15px;
    }

    .l_title {
        font-size: 1.5em;
    }
}