/* css/styles.css */
body {
    background-color: #f8f9fd;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 40px 20px;
    color: #333;
}
header {
    text-align: center;
    margin-bottom: 40px;
    background-color: #FFA500;
    padding: 20px 0;
    color: #fff;
}
#logo {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -1px;
}
.slider-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px;
    text-align: center;
}
#compression-label {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
}
.compression-level {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    appearance: none;
}
.compression-level::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFA500;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.level-value {
    font-size: 16px;
    font-weight: 600;
    color: #FFA500;
    margin-left: 10px;
}
#main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}
.box {
    flex: 1;
    min-height: 400px;
    border: 2px dashed #d1d5db;
    background-color: #fff;
    text-align: center;
    padding: 30px;
    box-sizing: border-box;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
}
.box:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}
.box-icon {
    font-size: 48px;
    color: #FFA500;
    margin-bottom: 20px;
    display: block;
    transition: transform 0.5s ease;
}
.box:hover .box-icon {
    animation: iconPulse 1s infinite;
}
@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
#controls {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.button-group {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
}
button {
    color: #fff;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}
button:hover {
    transform: translateY(-2px);
}
button:active {
    transform: translateY(0);
}
button i {
    font-size: 18px;
}
#upload-btn {
    background-color: #34a853;
}
#upload-btn:hover {
    background-color: #2e8b47;
}
#compress-btn {
    background-color: #FFA500;
}
#compress-btn:hover {
    background-color: #FF8C00;
}
#output-size {
    font-size: 16px;
    color: #4b5563;
    background: #f1f5f9;
    padding: 10px 20px;
    border-radius: 6px;
    width: 100%;
    text-align: center;
}
.adsense-box {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.adsense-box:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}
.adsense-box ins {
    display: block !important;
}
#preview-original, #preview-result {
    max-width: 100%;
    max-height: 250px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: opacity 0.3s ease;
}
#download-btn {
    display: none;
    margin-top: 30px;
    background-color: #34a853;
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}
#download-btn:hover {
    background-color: #2e8b47;
    transform: translateY(-2px);
}
#download-btn:active {
    transform: translateY(0);
}
#download-btn i {
    font-size: 18px;
}
#content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}
#content h1, #content h2, #content h3 {
    color: #333;
    margin-bottom: 20px;
}
#content p {
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 16px;
}
#content ul, #content ol {
    margin-bottom: 25px;
    padding-left: 25px;
}
#content ul li, #content ol li {
    margin-bottom: 10px;
    font-size: 16px;
}
#content section {
    margin-bottom: 50px;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
#faq {
    margin-top: 40px;
}
.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}
.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    color: #1a73e8;
}
.faq-answer {
    display: none;
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.6;
}
footer {
    text-align: center;
    margin-top: 60px;
    padding: 20px 0;
    background-color: #000;
    color: #fff;
    border-top: none;
}
footer a {
    margin: 0 20px;
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}
footer a:hover {
    color: #FFA500;
}
#slider-container-mobile {
    display: none;
}
@media (max-width: 1024px) {
    #main {
        flex-direction: column;
        align-items: center;
    }
    .box, #controls {
        width: 100%;
        max-width: 600px;
    }
    .button-group {
        flex-direction: column;
    }
    #slider-container-desktop {
        display: none;
    }
    #slider-container-mobile {
        display: block;
    }
    .adsense-box {
        width: 250px;
        height: 250px;
    }
    #content section {
        padding: 20px;
    }
}
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }
    header {
        padding: 15px 0;
    }
    #logo {
        font-size: 28px;
    }
    .box {
        padding: 20px;
        min-height: 300px;
    }
    .box-icon {
        font-size: 36px;
    }
    button {
        padding: 10px 20px;
        font-size: 14px;
    }
    #output-size {
        font-size: 14px;
        padding: 8px 16px;
    }
    .adsense-box {
        width: 250px;
        height: 250px;
    }
    #content p, #content ul li, #content ol li, .faq-answer {
        font-size: 14px;
    }
    .faq-question {
        font-size: 16px;
    }
    footer a {
        margin: 0 10px;
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    #logo {
        font-size: 24px;
    }
    .slider-container {
        margin: 0 auto 10px;
    }
    #compression-label {
        font-size: 14px;
    }
    .level-value {
        font-size: 14px;
    }
    .button-group {
        gap: 10px;
    }
    .adsense-box {
        width: 250px;
        height: 250px;
    }
    #content section {
        padding: 15px;
    }
}