* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #ffffff 50%, #dddddd 100%);
    min-height: 100vh;
    color: #333;
	overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	color: #333;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
	color: #333;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #44a5c5;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.upload-content i {
    font-size: 3rem;
    color: #44a5c5;
    margin-bottom: 15px;
}

.upload-content .h3,
.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-content p {
    color: #666;
    margin-bottom: 20px;
}

.file-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.file-name {
    font-weight: 600;
    color: #333;
}

.file-size {
    font-size: 0.9rem;
    color: #666;
}

/* Editor Section */
.editor-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #eee;
}

.canvas-wrapper {
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#imageCanvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.control-group {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    background: #fafafa;
}

.control-group h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group h3 i {
    color: white;
}

/* Slider Controls */
.slider-group {
    margin-bottom: 15px;
}

.slider-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.slider {
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #44a5c5;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: #5a6fd8;
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #44a5c5;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Compression Info */
.compression-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.size-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
}

.size-info span {
    display: flex;
    justify-content: space-between;
}

.savings {
    font-weight: 600;
    color: #28a745;
}

/* Filter Buttons */
.filter-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Resize Controls */
.resize-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dimension-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dimension-group label {
    min-width: 60px;
    font-weight: 500;
    color: #555;
}

.dimension-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.3s ease;
    max-width: 120px;
}

.dimension-input:hover {
    border-color: #44a5c5;
}

.dimension-input:focus {
    outline: none;
    border-color: #44a5c5;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ratio-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.ratio-info span {
    color: #666;
    font-style: italic;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* Format Selector */
.format-selector {
    margin-bottom: 15px;
}

.format-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.format-dropdown {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.format-dropdown:hover {
    border-color: #44a5c5;
}

.format-dropdown:focus {
    outline: none;
    border-color: #44a5c5;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.format-info {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.format-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
}

.format-description {
    color: #666;
    font-style: italic;
}

.estimated-size {
    color: #333;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: #44a5c5;
    color: white;
    margin: 0 auto;
}

.btn-primary:hover {
    background: #E96820;
}

.btn-primary > i{
    color:#fff;
}

.btn-primary:hover > i{
    color:#fff;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-filter {
    background: white;
    color: #333;
    border: 2px solid #ddd;
    font-size: 0.8rem;
    padding: 10px;
}

.btn-filter:hover {
    border-color: #44a5c5;
    color: #44a5c5;
}

.btn-filter.active {
    background: #44a5c5;
    color: white;
    border-color: #44a5c5;
}

/* Loading Indicator */
.loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #44a5c5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.error-message i {
    font-size: 1.2rem;
}

/* SEO Content */
.seo-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.seo-section {
    margin-bottom: 40px;
}

.seo-section h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.seo-section p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.feature-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    text-align: center;
    transition: all 0.3s ease;
}

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

.feature-item h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.feature-item h3 i {
    color: #44a5c5;
    font-size: 1.3rem;
}

.feature-item p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}

.benefits-list {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
}

.benefits-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: 1rem;
    line-height: 1.5;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list strong {
    color: #333;
}

/* FAQ Section */
.faq-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.faq-header {
    text-align: center;
    margin-bottom: 30px;
}

.faq-header h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.faq-header h2 i {
    color: #44a5c5;
    font-size: 1.6rem;
}

.faq-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fafafa;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: #44a5c5;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 25px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
}

.faq-question:hover {
    background: rgba(102, 126, 234, 0.05);
    color: #44a5c5;
}

.faq-question i:first-child {
    color: #44a5c5;
    font-size: 1.2rem;
    min-width: 20px;
}

.faq-question span {
    flex: 1;
    line-height: 1.4;
}

.faq-icon {
    color: #999 !important;
    font-size: 0.9rem !important;
    transition: transform 0.3s ease;
    min-width: 12px !important;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-item.active .faq-question {
    background: rgba(102, 126, 234, 0.05);
    color: #44a5c5;
    border-bottom: 1px solid #e9ecef;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    background: white;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    opacity: 1;
    padding: 25px;
}

.faq-answer p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    color:#333;
    opacity: 0.8;
    font-size: 0.9rem;
	position: relative;
	z-index: 25;
}



/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .editor-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-buttons {
        grid-template-columns: 1fr;
    }

    .upload-area {
        padding: 40px 15px;
    }

    .upload-content i {
        font-size: 2rem;
    }

    .control-group {
        padding: 15px;
    }

    .dimension-group {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .dimension-group label {
        min-width: auto;
        text-align: left;
    }

    .dimension-input {
        max-width: none;
    }

    .ratio-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .file-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .seo-content {
        padding: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-item {
        padding: 20px;
    }

    .seo-section h2 {
        font-size: 1.5rem;
    }

    .benefits-list li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .upload-section,
    .editor-section {
        padding: 20px;
    }

    .size-info span {
        font-size: 0.8rem;
    }

    .btn {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
}

.footer-links a{
	color:#333;
	
}


/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.slider:focus,
input:focus,
select:focus {
    outline: 2px solid #44a5c5;
    outline-offset: 2px;
}

.page-footer {
    width: 100%;
    margin: 150px auto 0;
    position: relative;
    z-index: 20;
	top: -20px;
}

.second-box:before {
    top: -141px;
    position: absolute;
    width: 0;
    height: 0;
    border-right: 0px solid transparent;
    border-left: 2800px solid transparent;
    border-bottom: 160px solid #E96820;
    content: '';
    left: 0;
}

.second-box{
    z-index:24;
    background:#E96820;
    position:relative;
}

.third-box:before {
    top: -256px;
    position: absolute;
    width: 0;
    height: 0;
    border-right: 0px solid transparent;
    border-left: 4000px solid transparent;
    border-bottom: 300px solid #44a5c5;
    content: '';
    left: 0;
}

.third-box{
    z-index:23;
    background: #FFFFFF;
    height: 0px;
    bottom: 25px;
    position:absolute;
}

.fourth-box:before {
    top: -306px;
    position: absolute;
    width: 0;
    height: 0;
    border-right: 0px solid transparent;
    border-left: 3900px solid transparent;
    border-bottom: 350px solid #BBBBBB;
    content: '';
    left: 0;
}

.fourth-box{
    z-index:22;
    background: #FFFFFF;
    height: 0px;
    bottom: 25px;
    position:absolute;
}
