/* Crop Image Tool - Professional Styles */
.crop-container {
    max-width: 1600px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.crop-wrapper {
    max-width: 1500px;
    margin: 0 auto;
}

.crop-title {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.crop-icon {
    font-size: 2.8rem;
    display: inline-block;
    animation: cut 1.5s infinite;
}

@keyframes cut {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

.crop-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-family: 'Poppins', sans-serif;
}

.crop-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* Upload Area */
.crop-upload-area {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crop-upload-area:hover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.05);
}

.crop-upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.crop-upload-area h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.crop-upload-area p {
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.crop-upload-hint {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.crop-file-input {
    display: none;
}

.crop-upload-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.2s;
}

.crop-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99,102,241,0.3);
}

/* Cropper Container */
.crop-cropper-container {
    margin-top: 1rem;
}

.crop-main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

/* Preview Area */
.crop-preview-area {
    background: var(--bg);
    border-radius: 20px;
    padding: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.crop-image-wrapper {
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.crop-image {
    max-width: 100%;
    max-height: 500px;
    display: block;
}

/* Controls Panel */
.crop-controls-panel {
    background: var(--bg);
    border-radius: 20px;
    padding: 1.2rem;
    border: 1px solid var(--border);
}

.crop-control-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.crop-control-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.crop-control-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text);
}

/* Aspect Ratio Buttons */
.crop-aspect-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.crop-aspect-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.crop-aspect-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.crop-aspect-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.crop-custom-aspect {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.crop-aspect-input {
    width: 70px;
    padding: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-align: center;
}

.crop-small-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
}

/* Slider Controls */
.crop-slider-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.crop-slider-group span:first-child {
    width: 45px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.crop-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

.crop-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.crop-slider-group span:last-child {
    width: 40px;
    font-size: 0.7rem;
    text-align: right;
    color: var(--text-light);
}

.crop-slider-small {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    background: var(--border);
    border-radius: 2px;
}

.crop-slider-small::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

/* Button Groups */
.crop-button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.crop-icon-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    color: var(--text);
}

.crop-icon-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.crop-primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.crop-primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(99,102,241,0.3);
}

.crop-secondary-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.crop-secondary-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.crop-download-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-top: 0.5rem;
}

.crop-download-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Export Options */
.crop-export-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.crop-select {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.6rem;
    border-radius: 10px;
    color: var(--text);
    font-size: 0.85rem;
}

#qualityControl {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#qualityControl span:first-child {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Info Group */
.crop-info-group {
    background: var(--surface);
    border-radius: 12px;
    padding: 0.8rem;
    margin-top: 1rem;
}

.crop-info-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    padding: 0.3rem 0;
    color: var(--text-light);
}

.crop-info-item strong {
    color: var(--primary);
}

/* Cropped Preview */
.crop-preview-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.crop-preview-container h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.crop-cropped-preview {
    background: var(--bg);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.crop-cropped-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.crop-preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Tips Section */
.crop-tips {
    margin-top: 2rem;
}

.crop-tips h3 {
    margin-bottom: 1rem;
}

.crop-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.crop-tip-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
}

.crop-tip-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.5rem;
}

.crop-tip-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: var(--primary);
}

.crop-tip-card p {
    font-size: 0.7rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* SEO */
.crop-seo {
    margin-top: 2rem;
    padding: 1.2rem;
    background: var(--surface);
    border-radius: 20px;
}

.feature-list {
    padding-left: 1.2rem;
    margin-top: 0.5rem;
}

.feature-list li {
    margin-bottom: 0.3rem;
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .crop-main-layout {
        grid-template-columns: 1fr;
    }
    
    .crop-controls-panel {
        order: 2;
    }
    
    .crop-preview-area {
        order: 1;
    }
}

@media (max-width: 768px) {
    .crop-container {
        padding: 0 1rem;
    }
    
    .crop-title {
        font-size: 2rem;
    }
    
    .crop-card {
        padding: 1.2rem;
    }
    
    .crop-aspect-buttons {
        gap: 0.3rem;
    }
    
    .crop-aspect-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }
    
    .crop-tips-grid {
        grid-template-columns: 1fr;
    }
    
    .crop-preview-actions {
        flex-direction: column;
    }
}