/* Image Cropper - Complete Styling */

.tool-page {
    padding-top: 0;
}

.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
    transition: all 0.3s;
}

.breadcrumb a:hover {
    color: #f97316;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #ddd;
}

.breadcrumb .current {
    color: #333;
    font-weight: 600;
}

.tool-header {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-header::before {
    content: '✂️🖼️';
    position: absolute;
    font-size: 300px;
    opacity: 0.05;
    top: -50px;
    right: -50px;
    animation: rotate 20s linear infinite;
}

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

.tool-header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.tool-icon-large {
    font-size: 72px;
    margin-bottom: 20px;
    animation: snip 2s ease-in-out infinite;
}

@keyframes snip {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-10deg); }
}

.tool-header h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.tool-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 25px;
    line-height: 1.6;
}

.tool-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 16px;
}

.meta-separator {
    opacity: 0.5;
}

.tool-content {
    padding: 60px 20px;
    background: #f8f9fa;
}

.cropper-root {
    max-width: 1400px;
    margin: 0 auto;
}

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

.upload-area {
    background: white;
    border: 3px dashed #cbd5e1;
    border-radius: 20px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #f97316;
    background: #fff7ed;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(249, 115, 22, 0.15);
}

.upload-area.drag-over {
    border-color: #f97316;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

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

.upload-area h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.upload-area p {
    color: #6b7280;
    margin-bottom: 25px;
    font-size: 15px;
}

/* Cropper Section */
.cropper-section {
    margin-bottom: 30px;
}

.cropper-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* Crop Panel */
.crop-panel,
.settings-panel {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 2px solid rgba(249, 115, 22, 0.1);
}

.crop-panel h3,
.settings-panel h3 {
    color: #f97316;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Crop Container */
.crop-container {
    position: relative;
    background: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

#cropCanvas {
    display: block;
    width: 100%;
    height: auto;
}

/* Crop Box */
.crop-box {
    position: absolute;
    border: 2px solid #f97316;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
}

/* Crop Handles */
.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #f97316;
    border-radius: 50%;
}

.crop-handle.nw {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.crop-handle.ne {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.crop-handle.sw {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.crop-handle.se {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

/* Crop Overlays (for better visual) */
.crop-overlay {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.crop-overlay.top {
    top: 0;
    left: 0;
    right: 0;
}

.crop-overlay.right {
    top: 0;
    right: 0;
    bottom: 0;
}

.crop-overlay.bottom {
    bottom: 0;
    left: 0;
    right: 0;
}

.crop-overlay.left {
    top: 0;
    left: 0;
    bottom: 0;
}

/* Crop Info */
.crop-info {
    display: flex;
    justify-content: center;
    padding: 12px;
    background: #fff7ed;
    border-radius: 8px;
    font-size: 14px;
    color: #9a3412;
}

.crop-info strong {
    color: #ea580c;
}

/* Settings Panel */
.aspect-ratios {
    margin-bottom: 20px;
}

.aspect-ratios label {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 14px;
}

.ratio-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 8px;
}

.ratio-btn {
    padding: 10px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
    font-size: 13px;
}

.ratio-btn:hover {
    border-color: #f97316;
    background: #fff7ed;
}

.ratio-btn.active {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.rotation-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.number-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid rgba(0,0,0,0.1);
    font-size: 14px;
    transition: all 0.3s;
}

.number-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #e5e7eb, #f97316);
    outline: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    border: 3px solid #f97316;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 3px solid #f97316;
}

/* Result Section */
.result-section {
    margin-bottom: 30px;
}

.result-panel {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 2px solid rgba(16, 185, 129, 0.2);
}

.result-panel h3 {
    color: #059669;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.result-preview {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.result-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: #ecfdf5;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #065f46;
}

.result-info strong {
    color: #047857;
    font-size: 16px;
}

.result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-ghost {
    background: white;
    border: 2px solid rgba(0,0,0,0.1);
    color: #1f2937;
}

.btn-ghost:hover {
    border-color: #f97316;
    color: #f97316;
}

.btn-large {
    width: 100%;
    padding: 18px 32px;
    font-size: 17px;
}

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

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 5px solid #f59e0b;
    padding: 30px;
    border-radius: 15px;
}

.info-box h4 {
    color: #92400e;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}

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

.info-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    line-height: 1.7;
    font-size: 14px;
    color: #555;
    border: 2px solid rgba(245, 158, 11, 0.2);
}

.info-item strong {
    color: #92400e;
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

/* SEO Content */
.seo-content {
    padding: 80px 20px;
    background: white;
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-article h2 {
    font-size: 32px;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #333;
}

.content-article h2:first-child {
    margin-top: 0;
}

.content-article p {
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.content-article strong {
    color: #333;
    font-weight: 700;
}

/* Related Tools */
.related-tools {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
}

.related-tools h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
    color: #f97316;
}

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

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #f97316;
}

.related-tool-card .tool-icon {
    font-size: 42px;
}

.related-tool-card .tool-name {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 15px 22px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    font-size: 15px;
    font-weight: 600;
    z-index: 10000;
    animation: slideInUp 0.3s ease-out;
}

.notification-toast.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 32px;
    }
    
    .tool-subtitle {
        font-size: 16px;
    }
    
    .tool-icon-large {
        font-size: 52px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .cropper-grid {
        grid-template-columns: 1fr;
    }
    
    .ratio-buttons {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    }
    
    .rotation-buttons {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .btn {
        width: 100%;
    }
    
    .content-article h2 {
        font-size: 26px;
    }
}

@media (max-width: 520px) {
    .tool-header {
        padding: 40px 20px;
    }
    
    .tool-header h1 {
        font-size: 28px;
    }
    
    .tool-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .meta-separator {
        display: none;
    }
    
    .result-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .notification-toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        font-size: 14px;
    }
}

html {
    scroll-behavior: smooth;
}