/* Crop & Rotate Specific Styles */

.tool-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Upload Card */
.upload-card {
    background: white;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.dark-mode .upload-card {
    background: #1f2937;
    border-color: #374151;
}

.upload-area {
    border: 2px dashed #e5e7eb;
    border-radius: 30px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: #f9fafb;
}

.dark-mode .upload-area:hover {
    background: #2d3748;
}

.upload-area i {
    font-size: 4rem;
    color: #3b82f6;
    margin-bottom: 15px;
}

.upload-area h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #111827;
}

.dark-mode .upload-area h3 {
    color: #f9fafb;
}

.upload-area p {
    color: #6b7280;
    margin-bottom: 5px;
}

.upload-area .supported-formats {
    font-size: 0.85rem;
    color: #9ca3af;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border-radius: 20px;
    padding: 20px;
}

.dark-mode .file-info {
    background: #111827;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-details i {
    font-size: 2rem;
    color: #3b82f6;
}

.file-name {
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 5px;
}

.dark-mode .file-name {
    color: #f9fafb;
}

.file-size {
    font-size: 0.85rem;
    color: #6b7280;
}

.change-file-btn {
    padding: 10px 20px;
    background: #e5e7eb;
    border: none;
    border-radius: 60px;
    color: #111827;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark-mode .change-file-btn {
    background: #374151;
    color: #f9fafb;
}

.change-file-btn:hover {
    background: #3b82f6;
    color: white;
}

/* Editor Container */
.editor-container {
    background: white;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.dark-mode .editor-container {
    background: #1f2937;
    border-color: #374151;
}

/* Toolbar */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.dark-mode .toolbar {
    background: #111827;
    border-bottom-color: #374151;
}

.toolbar-group {
    display: flex;
    gap: 5px;
    padding-right: 15px;
    border-right: 1px solid #e5e7eb;
}

.dark-mode .toolbar-group {
    border-right-color: #374151;
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-btn {
    padding: 10px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 60px;
    color: #111827;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dark-mode .toolbar-btn {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.toolbar-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
}

.toolbar-btn i {
    font-size: 1rem;
}

/* Crop Controls */
.crop-controls {
    display: flex;
    gap: 5px;
    margin-left: 5px;
}

.action-btn.small {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn.small:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.action-btn.small:last-child {
    background: #ef4444;
}

.action-btn.small:last-child:hover {
    background: #dc2626;
}

/* Editor Area */
.editor-area {
    padding: 30px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}

.dark-mode .editor-area {
    background: #111827;
}

.image-container {
    position: relative;
    max-width: 100%;
    max-height: 500px;
    overflow: hidden;
    display: inline-block;
}

.editor-image {
    max-width: 100%;
    max-height: 500px;
    display: block;
    margin: 0 auto;
}

/* Crop Overlay */
.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: crosshair;
    z-index: 100;
}

.crop-selection {
    position: absolute;
    border: 2px solid #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    pointer-events: none;
    z-index: 101;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

/* Export Bar */
.export-bar {
    padding: 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.dark-mode .export-bar {
    background: #111827;
    border-top-color: #374151;
}

.export-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.export-select {
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 60px;
    background: white;
    color: #111827;
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 120px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.dark-mode .export-select {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quality-control label {
    color: #6b7280;
    font-size: 0.9rem;
}

.quality-control span {
    color: #3b82f6;
    font-weight: 600;
    min-width: 45px;
}

.quality-control input[type="range"] {
    width: 150px;
    height: 6px;
    -webkit-appearance: none;
    background: #3b82f6;
    border-radius: 3px;
}

.quality-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

.download-btn {
    padding: 12px 30px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Info Section */
.info-section {
    background: #f9fafb;
    border-radius: 30px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid #e5e7eb;
}

.dark-mode .info-section {
    background: #111827;
    border-color: #374151;
}

.info-section h3 {
    font-size: 1.3rem;
    margin: 20px 0 15px;
    color: #111827;
}

.dark-mode .info-section h3 {
    color: #f9fafb;
}

.info-section h3:first-child {
    margin-top: 0;
}

.info-section p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 15px;
}

.dark-mode .info-section p {
    color: #9ca3af;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section ul li {
    padding: 8px 0;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .info-section ul li {
    color: #9ca3af;
}

.tip-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 20px;
    margin-top: 20px;
    border: 1px solid #bae6fd;
}

.dark-mode .tip-box {
    background: #1e3a5f;
    border-color: #2563eb;
}

.tip-box i {
    font-size: 1.5rem;
    color: #f59e0b;
    margin-top: 2px;
}

.tip-box div {
    color: #0369a1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.dark-mode .tip-box div {
    color: #bae6fd;
}

.tip-box strong {
    color: #111827;
}

.dark-mode .tip-box strong {
    color: #f9fafb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-group {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 10px;
        margin-bottom: 10px;
        flex-wrap: wrap;
    }
    
    .dark-mode .toolbar-group {
        border-bottom-color: #374151;
    }
    
    .toolbar-group:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .export-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quality-control {
        flex-wrap: wrap;
    }
    
    .quality-control input[type="range"] {
        width: 100%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}