.crop-component {
    background: #0f172a;
    border-radius: 16px;
    padding: 16px;
    color: #f1f5f9;
    font-family: 'Inter', sans-serif;
    user-select: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.crop-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
}

.crop-info {
    font-size: 11px;
    font-weight: 700;
    background: #1e293b;
    padding: 4px 12px;
    border-radius: 20px;
    color: #94a3b8;
}

.crop-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.crop-icon-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.crop-icon-btn:hover {
    color: #f1f5f9;
    background: #1e293b;
}

.crop-apply-btn {
    background: #ec4899;
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.crop-apply-btn:hover {
    background: #db2777;
    transform: scale(1.05);
}

.crop-tab-content {
    display: none;
    padding: 6px 0;
    flex: 1;
    min-height: 0;
}

.crop-tab-content.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    animation: fadeIn 0.3s ease-in-out;
}

.preset-search-wrap {
    position: relative;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.preset-search-wrap input {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 10px 12px;
    color: #f1f5f9;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
}

.preset-search-wrap input:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.1);
}

.preset-search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 14px;
}

.presets-scroll-section {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 8px;
    padding-right: 4px;
    border-radius: 8px;
}

.presets-scroll-section::-webkit-scrollbar {
    width: 5px;
}

.presets-scroll-section::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
}

.presets-scroll-section::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

.presets-scroll-section::-webkit-scrollbar-thumb:hover {
    background: #ec4899;
}

.ratio-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.manual-size-wrap {
    display: flex;
    gap: 12px;
    background: #1e293b;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #334155;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.manual-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.manual-input-group label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
}

.manual-input-group input {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 8px 10px;
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    outline: none;
    transition: all 0.2s;
}

.manual-input-group input:focus {
    border-color: #ec4899;
}

.ratio-list::-webkit-scrollbar {
    width: 4px;
}

.ratio-list::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

.ratio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #182131;
    color: #cbd5e1;
    cursor: pointer;
    padding: 10px 6px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    min-height: 84px;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.ratio-item .ratio-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(249, 115, 22, 0.13);
    color: #fb923c !important;
    font-size: 15px;
    margin-bottom: 2px;
}

.ratio-item .ratio-icon-wrap svg {
    color: inherit;
}

.ratio-item strong {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #f8fafc;
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ratio-item small {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ratio-item:hover,
.ratio-item.active {
    border-color: #ec4899;
    background: #2a2034;
}

.ratio-item.active strong {
    color: #ec4899;
}

.preset-instagram .ratio-icon-wrap { color: #f472b6 !important; background: rgba(244, 114, 182, 0.15); }
.preset-facebook .ratio-icon-wrap { color: #60a5fa !important; background: rgba(96, 165, 250, 0.15); }
.preset-youtube .ratio-icon-wrap { color: #f87171 !important; background: rgba(248, 113, 113, 0.15); }
.preset-linkedin .ratio-icon-wrap { color: #38bdf8 !important; background: rgba(56, 189, 248, 0.15); }
.preset-x-twitter .ratio-icon-wrap { color: #38bdf8 !important; background: rgba(56, 189, 248, 0.15); }
.preset-pinterest .ratio-icon-wrap { color: #fb7185 !important; background: rgba(251, 113, 133, 0.15); }
.preset-tiktok .ratio-icon-wrap { color: #22d3ee !important; background: rgba(34, 211, 238, 0.15); }
.preset-whatsapp .ratio-icon-wrap { color: #4ade80 !important; background: rgba(74, 222, 128, 0.15); }
.preset-snapchat .ratio-icon-wrap { color: #facc15 !important; background: rgba(250, 204, 21, 0.15); }
.preset-reddit .ratio-icon-wrap { color: #fb923c !important; background: rgba(251, 146, 60, 0.15); }
.preset-threads .ratio-icon-wrap { color: #c084fc !important; background: rgba(192, 132, 252, 0.15); }
.preset-etsy .ratio-icon-wrap { color: #fb923c !important; background: rgba(251, 146, 60, 0.15); }
.preset-twitch .ratio-icon-wrap { color: #c084fc !important; background: rgba(192, 132, 252, 0.15); }
.preset-patreon .ratio-icon-wrap { color: #f43f5e !important; background: rgba(244, 63, 94, 0.15); }
.preset-display .ratio-icon-wrap { color: #f472b6 !important; background: rgba(244, 114, 182, 0.15); }
.preset-logo .ratio-icon-wrap { color: #c084fc !important; background: rgba(192, 132, 252, 0.15); }
.preset-web .ratio-icon-wrap { color: #22d3ee !important; background: rgba(34, 211, 238, 0.15); }
.preset-merch .ratio-icon-wrap { color: #facc15 !important; background: rgba(250, 204, 21, 0.15); }
.preset-audio .ratio-icon-wrap { color: #fb923c !important; background: rgba(251, 146, 60, 0.15); }
.preset-video .ratio-icon-wrap { color: #4ade80 !important; background: rgba(74, 222, 128, 0.15); }
.preset-design .ratio-icon-wrap { color: #a855f7 !important; background: rgba(168, 85, 247, 0.15); }
.preset-wallpaper .ratio-icon-wrap { color: #60a5fa !important; background: rgba(96, 165, 250, 0.15); }
.preset-print .ratio-icon-wrap { color: #c084fc !important; background: rgba(192, 132, 252, 0.15); }
.preset-movie .ratio-icon-wrap { color: #94a3b8 !important; background: rgba(148, 163, 184, 0.15); }
.preset-mobile .ratio-icon-wrap { color: #4ade80 !important; background: rgba(74, 222, 128, 0.15); }
.preset-ratio .ratio-icon-wrap { color: #fbbf24 !important; background: rgba(251, 191, 36, 0.15); }

.slider-group {
    margin-bottom: 16px;
}

.slider-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
}

.slider-info .value {
    color: #ec4899;
}

.ruler-container {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.ruler-indicator {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ec4899;
    z-index: 2;
}

.correct-sub-tools {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 8px;
}

.correct-btn {
    background: #1e293b;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    padding: 10px 4px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    flex: 1;
    min-width: 0;
}

.correct-btn i {
    font-size: 18px;
}

.correct-btn.active {
    color: #ec4899;
    background: #ec489920;
}

.rotate-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flip-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.flip-action-btn {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #f1f5f9;
    padding: 16px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.flip-action-btn i {
    font-size: 22px;
    color: #ec4899;
}

.flip-action-btn:hover {
    background: #334155;
    border-color: #ec4899;
}

.flip-action-btn.active {
    background: rgba(236, 72, 153, 0.15);
    border-color: #ec4899;
    color: #ec4899;
}

.crop-tabs-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 12px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.crop-tab-btn {
    background: #1e293b;
    border: none;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s;
    flex: 1;
    padding: 8px;
    border-radius: 10px;
}

.crop-tab-btn i {
    font-size: 18px;
}

.crop-tab-btn:hover {
    background: #334155;
    color: #f1f5f9;
}

.crop-tab-btn.active {
    color: #ec4899;
    background: #ec489920;
}

/* Adjust-like UI behavior for Crop */
body.is-cropping .upload-panel,
body.is-cropping .layers-panel {
    display: none !important;
}

body.is-cropping #cropPanel,
#cropPanel:not(.hidden),
#cropComponentContainer,
#cropComponent {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#cropPanel::-webkit-scrollbar,
#cropComponentContainer::-webkit-scrollbar,
#cropComponent::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Mobile & Tablet Responsiveness for Crop Presets */
@media (max-width: 900px) {
    .crop-component {
        padding: 4px 6px;
        max-height: none !important;
        overflow: visible !important;
    }

    .crop-top-bar {
        margin-bottom: 4px;
        padding-bottom: 4px;
    }

    .crop-info {
        font-size: 9px;
        padding: 2px 6px;
    }

    .crop-icon-btn, .crop-apply-btn {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .crop-tabs-header {
        margin-bottom: 4px;
        padding-bottom: 4px;
        gap: 3px;
    }

    .crop-tab-btn {
        padding: 3px 2px;
        font-size: 8px;
        border-radius: 5px;
        gap: 1px;
    }

    .crop-tab-btn i {
        font-size: 12px;
    }

    .manual-size-wrap {
        padding: 3px 6px;
        margin-bottom: 4px;
        gap: 4px;
        border-radius: 6px;
    }

    .manual-input-group label {
        font-size: 7px;
        margin-bottom: 0;
    }

    .manual-input-group input {
        padding: 2px 4px;
        font-size: 10px;
        height: 22px;
        border-radius: 4px;
    }

    .preset-search-wrap {
        margin-bottom: 4px;
    }

    .preset-search-wrap input {
        padding: 3px 6px 3px 26px;
        font-size: 10px;
        height: 24px;
        border-radius: 6px;
    }

    .preset-search-wrap i {
        font-size: 11px;
        left: 8px;
    }

    .presets-scroll-section {
        min-height: 200px;
        max-height: 320px;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .ratio-item {
        padding: 6px 4px;
        min-height: 72px;
        gap: 3px;
        border-radius: 6px;
    }

    .ratio-item .ratio-icon-wrap {
        width: 24px;
        height: 24px;
        font-size: 12px;
        margin-bottom: 0;
        border-radius: 4px;
    }

    .ratio-item strong {
        font-size: 9px;
    }

    .ratio-item small {
        font-size: 8px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
