/* Resize Tool Styles */
.resize-section {
    padding: 40px 0 0;
    min-height: calc(100vh - 80px);
}

.resize-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.resize-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.resize-title i {
    color: #2196f3;
}

.resize-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.resize-tool {
    max-width: 1000px;
    margin: 0 auto 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* Upload Area */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #2196f3;
    border-radius: 15px;
    padding: 60px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(33, 150, 243, 0.05);
}

.upload-area:hover {
    border-color: #1976d2;
    background: rgba(33, 150, 243, 0.1);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    transform: scale(1.02);
}

.upload-area i {
    font-size: 4rem;
    color: #2196f3;
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.upload-area p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Controls */
.controls {
    margin-bottom: 30px;
}

.control-grid {
    display: grid;
    gap: 25px;
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.control-group label i {
    color: #2196f3;
    width: 20px;
}

/* Method Tabs */
.method-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
}

.method-tab {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: transparent;
    color: #7f8c8d;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.method-tab.active {
    background: white;
    color: #2196f3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.method-tab:hover:not(.active) {
    color: #2196f3;
}

/* Method Content */
.method-content {
    display: none;
}

.method-content.active {
    display: block;
}

/* Dimensions Method */
.dimension-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.dimension-group {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
}

.dimension-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
}

.dimension-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.dimension-group input:focus {
    outline: none;
    border-color: #2196f3;
}

.dimension-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.dimension-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dimension-btn:hover {
    border-color: #2196f3;
    color: #2196f3;
}

.dimension-btn.active {
    border-color: #2196f3;
    background: #2196f3;
    color: white;
}

.aspect-ratio {
    text-align: center;
}

.ratio-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: #bdc3c7;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.ratio-toggle input:checked + .toggle-slider {
    background: #2196f3;
}

.ratio-toggle input:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.ratio-toggle input {
    display: none;
}

.toggle-label {
    font-weight: 500;
    color: #2c3e50;
}

/* Percentage Method */
.percentage-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.percentage-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.percentage-input input {
    width: 120px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.3s ease;
}

.percentage-input input:focus {
    outline: none;
    border-color: #2196f3;
}

.percentage-input span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.percentage-presets {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.percentage-preset {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    color: #7f8c8d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.percentage-preset.active {
    border-color: #2196f3;
    background: #2196f3;
    color: white;
}

.percentage-preset:hover:not(.active) {
    border-color: #2196f3;
    color: #2196f3;
}

/* Preset Method */
.preset-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.preset-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    margin-bottom: 20px;
}

.preset-select:focus {
    outline: none;
    border-color: #2196f3;
}

.preset-grid {
    display: grid;
    gap: 15px;
}

.preset-category {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.preset-category.active {
    display: grid;
}

.preset-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.preset-option:hover {
    border-color: #2196f3;
    transform: translateY(-2px);
}

.preset-option.active {
    border-color: #2196f3;
    background: #2196f3;
    color: white;
}

.preset-option.active .preset-icon {
    background: white;
    color: #2196f3;
}

.preset-icon {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #2196f3;
    transition: all 0.3s ease;
}

.preset-option span {
    font-weight: 600;
    font-size: 0.9rem;
}

.preset-option small {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Quality Controls */
.quality-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.slider-group {
    margin-bottom: 15px;
}

.slider-group label {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
}

.slider-group input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.slider-value {
    float: right;
    font-weight: 600;
    color: #2196f3;
}

.option-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Format Options */
.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.format-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.format-option.active {
    border-color: #2196f3;
    background: #2196f3;
    color: white;
}

.format-option.active i {
    color: white;
}

.format-option:hover:not(.active) {
    border-color: #2196f3;
}

.format-option i {
    font-size: 1.5rem;
    color: #2196f3;
}

.format-option span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.resize-btn, .reset-btn {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.resize-btn {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
}

.resize-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

.resize-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.reset-btn {
    background: #95a5a6;
    color: white;
}

.reset-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* Status */
.status {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.status.success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid #27ae60;
}

.status.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.status.processing {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid #3498db;
}

/* Preview Area */
.preview-area {
    margin-top: 30px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.preview-header h3 {
    color: #2c3e50;
    margin: 0;
}

.size-comparison {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.size-original {
    color: #e74c3c;
}

.size-resized {
    color: #27ae60;
}

.size-comparison i {
    color: #7f8c8d;
}

/* Preview Container */
.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.preview-item {
    text-align: center;
}

.preview-item h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.image-overlay.success {
    background: rgba(39, 174, 96, 0.9);
}

.quality-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.image-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.info-item i {
    color: #2196f3;
}

/* Resize Stats */
.resize-stats {
    background: linear-gradient(135deg, #2196f3, #2980b9);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-content {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Download Section */
.download-section {
    text-align: center;
}

.download-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.3);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

/* Feature Highlights */
.feature-highlights {
    max-width: 1000px;
    margin: 0 auto 60px;
    text-align: center;
}

.feature-highlights h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 40px;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: white;
}

.feature-card h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .resize-tool {
        padding: 30px 20px;
        margin: 0 20px 40px;
    }

    .resize-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }

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

    .action-buttons {
        flex-direction: column;
    }

    .method-tabs {
        flex-direction: column;
    }

    .dimension-group {
        grid-template-columns: 1fr;
    }

    .dimension-actions {
        justify-content: center;
        margin: 10px 0;
    }

    .preset-grid {
        grid-template-columns: 1fr;
    }

    .format-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .preview-header {
        flex-direction: column;
        text-align: center;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .resize-title {
        font-size: 1.8rem;
    }

    .resize-subtitle {
        font-size: 1rem;
    }

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

    .upload-area i {
        font-size: 3rem;
    }

    .percentage-presets {
        flex-direction: column;
        align-items: center;
    }

    .percentage-preset {
        width: 100px;
    }
}