.icrop-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.icrop-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.icrop-section {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.icrop-section h3 {
    font-size: 0.9em;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icrop-section h3 i {
    color: #3498db;
}

.icrop-upload {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.icrop-upload:hover,
.icrop-upload.dragover {
    border-color: #3498db;
    background: #f0f7ff;
}

.icrop-upload i {
    font-size: 1.6em;
    color: #3498db;
    margin-bottom: 6px;
}

.icrop-upload p {
    color: #666;
    font-size: 0.8em;
    margin: 0 0 4px;
}

.icrop-hint {
    color: #999;
    font-size: 0.72em;
}

.icrop-mode-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
}

.icrop-mode-tab {
    flex: 1;
    padding: 7px 3px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 0.75em;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.icrop-mode-tab:hover {
    color: #334155;
}

.icrop-mode-tab.active {
    background: #fff;
    color: #3498db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.icrop-mode-panel {
    display: none;
    margin-top: 10px;
}

.icrop-mode-panel.active {
    display: block;
}

.icrop-form-row {
    margin-bottom: 12px;
}

.icrop-form-row label {
    display: block;
    font-size: 0.82em;
    color: #555;
    margin-bottom: 5px;
    font-weight: 500;
}

.icrop-input-group {
    display: flex;
    gap: 6px;
}

.icrop-input-group-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.icrop-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.icrop-input-label {
    font-size: 0.7em;
    color: #94a3b8;
    font-weight: 600;
}

.icrop-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85em;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.icrop-input:focus {
    border-color: #3498db;
}

.icrop-select {
    width: 100%;
    padding: 7px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85em;
    background: #fff;
}

.icrop-form-row input[type="range"] {
    width: 100%;
    margin-top: 4px;
}

.icrop-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.82em;
    color: #555;
}

.icrop-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #3498db;
}

.icrop-dim-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.8em;
    color: #334155;
    font-weight: 600;
}

.icrop-dim-display span {
    text-align: center;
}

.icrop-ratio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.icrop-ratio-btn {
    padding: 5px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 0.78em;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.icrop-ratio-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.icrop-ratio-btn.active {
    border-color: #3498db;
    background: #f0f7ff;
    color: #3498db;
}

.icrop-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.icrop-btn {
    flex: 1;
    min-width: 70px;
    padding: 9px;
    border: none;
    border-radius: 8px;
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.icrop-btn-primary {
    background: #3498db;
    color: #fff;
}

.icrop-btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.icrop-btn-success {
    background: #27ae60;
    color: #fff;
}

.icrop-btn-success:hover:not(:disabled) {
    background: #219a52;
}

.icrop-btn-outline {
    background: #fff;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.icrop-btn-outline:hover:not(:disabled) {
    background: #fef2f2;
}

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

.icrop-usage-info {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.8em;
    color: #2c3e50;
    text-align: center;
}

.icrop-usage-info i {
    color: #3498db;
    margin-right: 4px;
}

.icrop-vip-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(0,0,0,0.75);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    backdrop-filter: blur(2px);
}

.icrop-vip-mask-inner {
    text-align: center;
    color: #fff;
    padding: 30px;
}

.icrop-vip-mask-icon {
    font-size: 3em;
    margin-bottom: 12px;
}

.icrop-vip-mask-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 8px;
}

.icrop-vip-mask-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.icrop-vip-btn {
    background: #3498db;
    color: #fff;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.icrop-vip-btn:hover {
    background: #2980b9;
}

.icrop-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}

.icrop-preview-area {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.icrop-placeholder {
    text-align: center;
    color: #999;
}

.icrop-placeholder i {
    font-size: 3em;
    margin-bottom: 12px;
    color: #bdc3c7;
}

.icrop-placeholder p {
    margin: 0;
}

/* Canvas wrap with overlay for visual cropping */
.icrop-canvas-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    user-select: none;
    cursor: crosshair;
}

.icrop-canvas-wrap canvas {
    display: block;
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.icrop-overlay {
    position: absolute;
    border: 2px dashed #3498db;
    background: rgba(52, 152, 219, 0.15);
    pointer-events: none;
    display: none;
    box-sizing: border-box;
}

.icrop-overlay.active {
    display: block;
}

.icrop-overlay-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.icrop-overlay-info {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: #fff;
    font-size: 0.75em;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.icrop-tips {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.icrop-tips h4 {
    font-size: 0.95em;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icrop-tips h4 i {
    color: #f39c12;
}

.icrop-tip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.icrop-tip-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    border-left: 3px solid #3498db;
}

.icrop-tip-item strong {
    display: block;
    font-size: 0.85em;
    color: #2c3e50;
    margin-bottom: 3px;
}

.icrop-tip-item p {
    font-size: 0.75em;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .icrop-container { grid-template-columns: 1fr; }
    .icrop-tip-grid { grid-template-columns: 1fr; }
    .icrop-input-group-4 { grid-template-columns: 1fr 1fr; }
}
