/**
 * Image Rotator Tool - Styles
 * Clean, modern, mobile-first responsive design
 */

/* Tool Container */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: white;
    border-radius: 15px;
    color: #2c3e50;
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #e74c3c;
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.tool-description {
    font-size: 1.1rem;
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.section-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header i {
    color: #e74c3c;
    font-size: 1.2rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
}

.preview-stats {
    margin-left: auto;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.results-summary {
    margin-left: auto;
}

/* Upload Section */
.upload-area {
    padding: 40px 25px;
    text-align: center;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.upload-icon {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 15px;
}

.upload-content h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-weight: 600;
}

.upload-content p {
    margin: 10px 0;
    color: #6c757d;
}

.upload-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 15px;
}

/* URL Upload */
.url-upload {
    padding: 0 25px 25px 25px;
    text-align: center;
}

.url-input {
    margin-top: 15px;
}

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

.form-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Controls Grid */
.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 25px;
}

.control-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.control-card h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Preset Buttons */
.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

.preset-btn:hover {
    border-color: #e74c3c;
    background-color: #fdf2f2;
    transform: translateY(-2px);
}

.preset-btn.active {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.preset-btn i {
    font-size: 1.5rem;
    color: #e74c3c;
}

/* Custom Angle Controls */
.custom-angle-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.angle-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.angle-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
}

.angle-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e74c3c;
    cursor: pointer;
}

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

.angle-display {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 80px;
}

.angle-number {
    width: 60px;
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.angle-unit {
    font-weight: 500;
    color: #6c757d;
}

/* Flip Buttons */
.flip-buttons {
    display: flex;
    gap: 12px;
}

.flip-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

.flip-btn:hover {
    border-color: #e74c3c;
    background-color: #fdf2f2;
    transform: translateY(-2px);
}

.flip-btn.active {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.flip-btn i {
    font-size: 1.5rem;
    color: #e74c3c;
}

/* Option Controls */
.option-controls {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e74c3c;
}

.checkbox-label i {
    color: #e74c3c;
    margin-left: 5px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

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

.btn-primary {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
}

.btn-outline:hover {
    background: #e74c3c;
    color: white;
}

.btn-link {
    background: transparent;
    color: #e74c3c;
    text-decoration: underline;
    border: none;
    padding: 8px 0;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 25px;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

/* Image Grids */
.image-previews-grid,
.rotated-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 25px;
}

/* Image Preview Cards */
.image-preview-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.image-preview-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.image-preview-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.image-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-size {
    font-size: 0.9rem;
    color: #6c757d;
}

.image-container {
    position: relative;
    padding: 15px;
    text-align: center;
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    max-width: 100%;
    max-height: 180px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.rotation-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.image-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.image-format {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Result Cards */
.result-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.result-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-name {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 10px;
}

.result-rotation {
    font-size: 0.9rem;
    color: #e74c3c;
    font-weight: 500;
    background: rgba(231, 76, 60, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Comparison Section */
.result-comparison {
    display: flex;
    align-items: center;
    padding: 20px 15px;
    background: #f8f9fa;
    gap: 15px;
}

.comparison-item {
    flex: 1;
    text-align: center;
}

.comparison-image {
    width: 100%;
    max-width: 120px;
    max-height: 80px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

.comparison-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.comparison-info {
    font-size: 0.8rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
}

.comparison-arrow {
    color: #e74c3c;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Result Actions */
.result-actions {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

/* Progress Section */
.progress-container {
    padding: 25px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.progress-details {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.processing-queue {
    margin-top: 20px;
}

.processing-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    gap: 12px;
}

.processing-item:last-child {
    margin-bottom: 0;
}

.processing-icon {
    color: #e74c3c;
    font-size: 1.1rem;
}

.processing-name {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

.processing-status {
    font-size: 0.9rem;
    color: #6c757d;
}

.processing-status.success {
    color: #28a745;
}

.processing-status.error {
    color: #dc3545;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification:not(.hidden) {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 12px;
}

.notification-icon {
    font-size: 1.2rem;
}

.notification-icon.success {
    color: #28a745;
}

.notification-icon.error {
    color: #dc3545;
}

.notification-icon.info {
    color: #17a2b8;
}

.notification-message {
    flex: 1;
    color: #2c3e50;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6c757d;
    margin-left: auto;
}

/* SEO Content */
.seo-content {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.seo-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    line-height: 1.6;
}

.seo-section h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.seo-section h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.seo-section p {
    color: #495057;
    margin-bottom: 15px;
}

.seo-section ul,
.seo-section ol {
    color: #495057;
    margin-bottom: 20px;
    padding-left: 25px;
}

.seo-section li {
    margin-bottom: 8px;
}

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

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

    .tool-header {
        padding: 20px 15px;
    }

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

    .controls-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .preset-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

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

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

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }

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

    .results-actions .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .input-group {
        flex-direction: column;
    }

    .notification {
        left: 15px;
        right: 15px;
        max-width: none;
    }

    .result-comparison {
        flex-direction: column;
        gap: 10px;
    }

    .comparison-arrow {
        transform: rotate(90deg);
    }

    .image-previews-grid,
    .rotated-images-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .seo-content {
        padding: 0 15px;
    }

    .seo-section {
        padding: 20px;
    }

    .angle-input-group {
        flex-direction: column;
        gap: 10px;
    }

    .angle-display {
        justify-content: center;
    }
}

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

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

    .upload-area {
        padding: 30px 20px;
        margin: 20px;
    }

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

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

    .preset-btn {
        padding: 12px;
    }

    .btn-large {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .section-header {
        padding: 15px 20px;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    .control-card {
        padding: 15px;
    }
}
