/* Image Resizer Tool Styles */

/* Tool Container */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: #f8fafc;
    min-height: 100vh;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    animation: float 3s ease-in-out infinite;
}

.tool-icon i {
    font-size: 2.5rem;
    color: white;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.tool-description {
    font-size: 1.25rem;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    
    border: 1px solid #e2e8f0;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 0.75rem;
}

.section-header i {
    font-size: 1.5rem;
    color: #667eea;
}

.section-header h2,
.section-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.image-info {
    font-size: 0.875rem;
    color: #718096;
    margin-left: auto;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f7fafc;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #667eea;
    background: #edf2f7;
    transform: scale(1.02);
}

.upload-content h3 {
    font-size: 1.25rem;
    color: #2d3748;
    margin: 1rem 0 0.5rem;
}

.upload-content p {
    color: #718096;
    margin: 0.5rem 0;
}

.upload-icon {
    font-size: 3rem;
    color: #a0aec0;
    margin-bottom: 1rem;
}

.upload-info {
    font-size: 0.875rem;
    color: #a0aec0;
    margin-top: 1rem;
}

/* URL Upload */
.url-upload {
    margin-top: 1.5rem;
    text-align: center;
}

.url-input {
    margin-top: 1rem;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Resize Grid */
.resize-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.preview-card,
.controls-card {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

/* Image Container */
.image-container {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 400px;
    overflow: hidden;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Control Groups */
.control-group {
    margin-bottom: 1.5rem;
}

.control-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

/* Preset Grid */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.preset-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.preset-btn:hover {
    border-color: #667eea;
    background: #edf2f7;
    color: #667eea;
}

.preset-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Dimension Inputs */
.dimension-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-field label {
    display: block;
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

/* Form Elements */
.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
}

.aspect-icon {
    margin-left: 0.5rem;
    color: #667eea;
}

/* Quality Slider */
.quality-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.quality-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(72, 187, 120, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}

.btn-outline {
    background: white;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-outline:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.btn-link {
    background: none;
    color: #667eea;
    border: none;
    padding: 0.5rem;
    text-decoration: underline;
}

.btn-link:hover {
    color: #5a67d8;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    width: 100%;
}

/* Result Actions */
.result-content {
    text-align: center;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    max-width: 300px;
    margin: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-content h3 {
    font-size: 1.25rem;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: #718096;
    font-size: 0.875rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    max-width: 400px;
    min-width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #667eea;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.notification-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.notification.success {
    border-left-color: #48bb78;
}

.notification.success .notification-icon {
    background: #48bb78;
}

.notification.error {
    border-left-color: #f56565;
}

.notification.error .notification-icon {
    background: #f56565;
}

.notification.warning {
    border-left-color: #ed8936;
}

.notification.warning .notification-icon {
    background: #ed8936;
}

.notification.info {
    border-left-color: #4299e1;
}

.notification.info .notification-icon {
    background: #4299e1;
}

.notification-message {
    flex: 1;
    font-size: 0.875rem;
    color: #2d3748;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: #718096;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* SEO Content */
.seo-content {
    max-width: 800px;
    margin: 4rem auto 0;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.seo-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.seo-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 2rem 0 1rem;
}

.seo-section p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.seo-section ul,
.seo-section ol {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.seo-section li {
    margin-bottom: 0.5rem;
}

.seo-section strong {
    color: #2d3748;
    font-weight: 600;
}

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

    .tool-icon {
        width: 60px;
        height: 60px;
    }

    .tool-icon i {
        font-size: 2rem;
    }

    .tool-title {
        font-size: 2rem;
    }

    .tool-description {
        font-size: 1rem;
    }

    .section-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .resize-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .dimension-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .input-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .result-actions {
        flex-direction: column;
        align-items: center;
    }

    .result-actions .btn {
        width: 100%;
        max-width: 250px;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .upload-icon {
        font-size: 2.5rem;
    }

    .notification {
        left: 0.5rem;
        right: 0.5rem;
        max-width: none;
        min-width: auto;
    }

    .loading-content {
        margin: 0.5rem;
        padding: 1.5rem;
    }

    .seo-content {
        margin: 2rem auto 0;
        padding: 1.5rem;
    }

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

    .seo-section h3 {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .tool-container {
        padding: 0.5rem 0.25rem;
    }

    .section-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .tool-title {
        font-size: 1.75rem;
    }

    .section-header h2,
    .section-header h3 {
        font-size: 1.25rem;
    }

    .btn {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .btn-large {
        padding: 1rem 1.5rem;
    }

    .upload-area {
        padding: 1.5rem 0.75rem;
    }

    .upload-content h3 {
        font-size: 1.125rem;
    }

    .preset-btn {
        padding: 0.875rem 0.5rem;
        font-size: 0.8rem;
    }

    .image-container {
        min-height: 200px;
        max-height: 300px;
    }
}

/* Touch Interactions */
@media (hover: none) and (pointer: coarse) {
    .btn:active {
        transform: scale(0.98);
    }

    .preset-btn:active {
        transform: scale(0.98);
    }

    .upload-area:active {
        transform: scale(0.99);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tool-icon {
        box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    }

    .preview-image {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .tool-container {
        background: #1a202c;
    }

    .section-card {
        background: #2d3748;
        border-color: #4a5568;
    }

    .tool-title {
        color: #f7fafc;
    }

    .tool-description {
        color: #e2e8f0;
    }

    .section-header h2,
    .section-header h3 {
        color: #f7fafc;
    }

    .control-label {
        color: #e2e8f0;
    }

    .form-input,
    .form-select {
        background: #4a5568;
        border-color: #718096;
        color: #f7fafc;
    }

    .form-input:focus,
    .form-select:focus {
        border-color: #667eea;
        background: #2d3748;
    }

    .preset-btn {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }

    .preset-btn:hover {
        background: #2d3748;
        border-color: #667eea;
        color: #667eea;
    }

    .image-container {
        background: #4a5568;
        border-color: #718096;
    }

    .preview-card,
    .controls-card {
        background: #374151;
        border-color: #4a5568;
    }

    .upload-area {
        background: #374151;
        border-color: #4a5568;
    }

    .upload-area:hover,
    .upload-area.drag-over {
        background: #2d3748;
        border-color: #667eea;
    }

    .upload-content h3 {
        color: #f7fafc;
    }

    .upload-content p {
        color: #a0aec0;
    }

    .seo-content {
        background: #2d3748;
        border-color: #4a5568;
    }

    .seo-section h2,
    .seo-section h3 {
        color: #f7fafc;
    }

    .seo-section p,
    .seo-section li {
        color: #e2e8f0;
    }

    .notification {
        background: #2d3748;
    }

    .notification-message {
        color: #f7fafc;
    }

    .loading-content {
        background: #2d3748;
    }

    .loading-content h3 {
        color: #f7fafc;
    }

    .loading-content p {
        color: #a0aec0;
    }
}
