     * {
         margin: 0;
         padding: 0;
         box-sizing: border-box;
         font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     }

     body {
         background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
         min-height: 100vh;
         display: flex;
         justify-content: center;
         align-items: center;
         padding: 20px;
     }

     .container {
         width: 100%;
         max-width: 1200px;
         background-color: rgba(255, 255, 255, 0.97);
         border-radius: 20px;
         box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
         overflow: hidden;
         display: flex;
         flex-direction: column;
     }

     header {
         background: linear-gradient(to right, #1a2980, #26d0ce);
         color: white;
         padding: 30px 40px;
         text-align: center;
         position: relative;
         overflow: hidden;
     }

         header::before {
             content: "";
             position: absolute;
             top: -50%;
             left: -50%;
             width: 200%;
             height: 200%;
             background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
             transform: rotate(30deg);
         }

         header h1 {
             font-size: 2.5rem;
             margin-bottom: 10px;
             display: flex;
             align-items: center;
             justify-content: center;
             gap: 15px;
             position: relative;
             text-shadow: 0 2px 4px rgba(0,0,0,0.2);
         }

         header p {
             font-size: 1.2rem;
             opacity: 0.9;
             max-width: 700px;
             margin: 15px auto 0;
             position: relative;
         }

     .content {
         display: flex;
         padding: 0;
         flex-wrap: wrap;
     }

     .upload-section {
         flex: 1;
         min-width: 350px;
         padding: 40px;
         border-right: 1px solid #eee;
         position: relative;
     }

     .result-section {
         flex: 1;
         min-width: 350px;
         padding: 40px;
         background-color: #f9f9ff;
         display: flex;
         flex-direction: column;
     }

     .section-title {
         font-size: 1.6rem;
         color: #333;
         margin-bottom: 25px;
         display: flex;
         align-items: center;
         gap: 10px;
         position: relative;
         padding-bottom: 10px;
     }

         .section-title::after {
             content: "";
             position: absolute;
             bottom: 0;
             left: 0;
             width: 50px;
             height: 3px;
             background: linear-gradient(to right, #1a2980, #26d0ce);
             border-radius: 3px;
         }

         .section-title i {
             color: #1a2980;
         }

     .upload-area {
         border: 3px dashed #1a2980;
         border-radius: 15px;
         padding: 40px 20px;
         text-align: center;
         cursor: pointer;
         transition: all 0.3s;
         background-color: #f0f4ff;
         margin-bottom: 25px;
         position: relative;
         overflow: hidden;
     }

         .upload-area:hover, .upload-area.dragover {
             background-color: #e6ebff;
             transform: translateY(-5px);
             box-shadow: 0 10px 25px rgba(26, 41, 128, 0.2);
         }

         .upload-area i {
             font-size: 4.5rem;
             color: #1a2980;
             margin-bottom: 20px;
             opacity: 0.8;
         }

         .upload-area h3 {
             font-size: 1.5rem;
             color: #444;
             margin-bottom: 15px;
         }

         .upload-area p {
             color: #666;
             margin-bottom: 20px;
             font-size: 1.05rem;
         }

     .browse-btn {
         background: linear-gradient(to right, #1a2980 0%, #26d0ce 100%);
         color: white;
         border: none;
         padding: 13px 35px;
         font-size: 1.1rem;
         border-radius: 50px;
         cursor: pointer;
         transition: all 0.3s;
         font-weight: 600;
         box-shadow: 0 5px 15px rgba(26, 41, 128, 0.3);
         position: relative;
         overflow: hidden;
     }

         .browse-btn:hover {
             transform: translateY(-3px);
             box-shadow: 0 8px 20px rgba(26, 41, 128, 0.4);
         }

         .browse-btn:active {
             transform: translateY(1px);
         }

         .browse-btn.refresh {
             position: absolute;
             top: 40px;
             right: 40px;
             padding: 7px 25px;
         }

     .file-input {
         display: none;
     }

     .preview-container {
         margin-top: 30px;
         text-align: center;
     }

     .preview-title {
         font-size: 1.3rem;
         margin-bottom: 20px;
         color: #555;
         display: flex;
         align-items: center;
         justify-content: center;
         gap: 10px;
     }

     .image-preview {
    width: 100%;
    height: 280px;
    border: 1px solid #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 15px 0;
    background: #fafafa;
}
#previewImage {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
         .image-preview img {
             width: 100%;
             height: 100%;
             object-fit: contain;
             background: #f8f8f8;
         }

     .compression-control {
         background: white;
         border-radius: 12px;
         padding: 20px;
         margin-bottom: 25px;
         box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
     }

     .quality-label {
         display: flex;
         justify-content: space-between;
         margin-bottom: 15px;
         font-size: 1.1rem;
         color: #444;
     }

     .quality-value {
         font-weight: 700;
         color: #1a2980;
         font-size: 1.2rem;
         min-width: 45px;
         text-align: right;
     }

     .slider-container {
         position: relative;
         height: 40px;
     }

     .quality-slider {
         width: 100%;
         height: 10px;
         -webkit-appearance: none;
         background: linear-gradient(to right, #ff416c, #ff4b2b, #ff9500, #ffcc00, #a8e063, #56ab2f);
         outline: none;
         border-radius: 5px;
     }

         .quality-slider::-webkit-slider-thumb {
             -webkit-appearance: none;
             width: 25px;
             height: 25px;
             border-radius: 50%;
             background: #1a2980;
             cursor: pointer;
             box-shadow: 0 2px 10px rgba(0,0,0,0.2);
             border: 3px solid white;
         }

         .quality-slider::-moz-range-thumb {
             width: 25px;
             height: 25px;
             border-radius: 50%;
             background: #1a2980;
             cursor: pointer;
             box-shadow: 0 2px 10px rgba(0,0,0,0.2);
             border: 3px solid white;
         }

     .slider-ticks {
         display: flex;
         justify-content: space-between;
         padding: 0 12px;
         font-size: 0.85rem;
         color: #777;
         margin-top: 5px;
     }

     .upload-btn {
         width: 100%;
         padding: 16px;
         background: linear-gradient(to right, #00c853 0%, #64dd17 100%);
         color: white;
         border: none;
         border-radius: 12px;
         font-size: 1.2rem;
         font-weight: 600;
         cursor: pointer;
         transition: all 0.3s;
         box-shadow: 0 6px 18px rgba(0, 200, 83, 0.3);
         display: block;
         position: relative;
         overflow: hidden;
     }

         .upload-btn:hover {
             transform: translateY(-3px);
             box-shadow: 0 9px 22px rgba(0, 200, 83, 0.4);
         }

         .upload-btn:disabled {
             background: #cccccc;
             cursor: not-allowed;
             transform: none;
             box-shadow: none;
         }

     .progress-container {
         height: 10px;
         background-color: #e0e0e0;
         border-radius: 5px;
         margin: 20px 0;
         overflow: hidden;
         display: none;
     }

     .progress-bar {
         height: 100%;
         background: linear-gradient(to right, #1a2980 0%, #26d0ce 100%);
         width: 0%;
         transition: width 0.4s ease;
     }

     .comparison-container {
         display: flex;
         justify-content: space-around;
         margin: 25px 0;
         gap: 20px;
     }

     .comparison-item {
         text-align: center;
         flex: 1;
         background: white;
         padding: 20px 15px;
         border-radius: 12px;
         box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
     }

         .comparison-item h4 {
             margin-bottom: 12px;
             color: #555;
             font-size: 1.15rem;
         }

     .size-info {
         font-weight: 700;
         font-size: 1.3rem;
         color: #1a2980;
     }

     .api-info {
         background: #e3f2fd;
         padding: 15px;
         border-radius: 10px;
         margin-top: 20px;
         font-family: monospace;
         font-size: 0.95rem;
         color: #1a2980;
     }

     footer {
         text-align: center;
         padding: 25px;
         color: #666;
         background-color: #f5f5f5;
         border-top: 1px solid #eee;
         font-size: 1.05rem;
     }

     .result-container {
         background: white;
         border-radius: 15px;
         padding: 25px;
         box-shadow: 0 7px 20px rgba(0, 0, 0, 0.07);
         min-height: 180px;
         border: 1px solid #f0f0f0;
         flex-grow: 1;
         display: flex;
         flex-direction: column;
     }

     .result-content {
         flex-grow: 1;
         display: flex;
         flex-direction: column;
         justify-content: center;
         align-items: center;
     }

     .compressed-image {
         max-width: 100%;
         max-height: 250px;
         border-radius: 12px;
         box-shadow: 0 5px 15px rgba(0,0,0,0.1);
         margin-bottom: 25px;
         border: 1px solid #eee;
         display: none;
     }

     .download-btn {
         display: inline-block;
         background: linear-gradient(to right, #1a2980 0%, #26d0ce 100%);
         color: white;
         padding: 14px 30px;
         font-size: 1.1rem;
         font-weight: 600;
         border-radius: 50px;
         text-decoration: none;
         transition: all 0.3s;
         box-shadow: 0 5px 15px rgba(26, 41, 128, 0.3);
         display: none;
         align-items: center;
         gap: 10px;
     }

         .download-btn:hover {
             transform: translateY(-3px);
             box-shadow: 0 8px 20px rgba(26, 41, 128, 0.4);
         }

     .info-card {
         background: white;
         border-radius: 15px;
         padding: 25px;
         box-shadow: 0 7px 20px rgba(0, 0, 0, 0.07);
         margin-bottom: 30px;
         border: 1px solid #f0f0f0;
     }

         .info-card h4 {
             color: #1a2980;
             margin-bottom: 20px;
             font-size: 1.3rem;
             display: flex;
             align-items: center;
             gap: 12px;
         }

         .info-card ul {
             list-style-type: none;
             padding-left: 5px;
         }

         .info-card li {
             margin-bottom: 14px;
             padding-left: 32px;
             position: relative;
             font-size: 1.05rem;
             color: #555;
             line-height: 1.5;
         }

             .info-card li:before {
                 content: "•";
                 color: #1a2980;
                 font-size: 2rem;
                 position: absolute;
                 left: 0;
                 top: -8px;
             }

     .response-area {
         background: white;
         border-radius: 15px;
         padding: 25px;
         box-shadow: 0 7px 20px rgba(0, 0, 0, 0.07);
         min-height: 100px;
         border: 1px solid #f0f0f0;
         margin-top: 20px;
     }

     .response-title {
         color: #1a2980;
         margin-bottom: 15px;
         font-size: 1.3rem;
         display: flex;
         align-items: center;
         gap: 12px;
     }

     .response-content {
         font-size: 1.1rem;
         line-height: 1.6;
         color: #555;
         min-height: 60px;
         display: flex;
         align-items: center;
         justify-content: center;
         padding: 15px;
         text-align: center;
     }

     @media (max-width: 768px) {
         body {
         padding:20px 0;
         }
         header {
             padding: 30px 20px;
         }
         .content {
             flex-direction: column;
         }

         .upload-section {
             border-right: none;
             border-bottom: 1px solid #eee;
             padding:20px;
         }
         .result-section {
         padding:20px;
         }
         header h1 {
             font-size: 2rem;
         }

         header p {
             font-size: 1rem;
         }
         .browse-btn.refresh {
         top:20px;
         right:20px;
         }
         a.browse-btn.refresh {
         right:130px;
         }
     }

     .success-message {
         color: #00c853;
         font-weight: 600;
     }

     .error-message {
         color: #f44336;
         font-weight: 600;
     }

     .result-placeholder {
         text-align: center;
         color: #777;
         font-size: 1.1rem;
         padding: 40px 20px;
     }

         .result-placeholder i {
             font-size: 4rem;
             color: #e0e0e0;
             margin-bottom: 20px;
         }
