/* 이미지 압축 도구 스타일 - mockup-generator 디자인 언어 차용 (emerald/teal 테마) */
.imgcomp-tool {
    --tool-primary: #059669;
    --tool-bg: #ecfdf5;
    --tool-gradient: linear-gradient(135deg, #059669 0%, #0d9488 100%);
}

/* 히어로 */
.imgcomp-hero {
    background: var(--tool-gradient);
    border-radius: 16px;
    padding: 36px 32px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
}
.imgcomp-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}
.imgcomp-hero::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -60px;
    width: 260px;
    height: 260px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}
.imgcomp-hero h1 {
    font-size: 28px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    margin: 10px 0 6px;
}
.imgcomp-hero p {
    opacity: 0.85;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

/* 에디터 카드 */
.editor-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.editor-card .editor-body {
    padding: 20px;
}

/* 테마 색상 적용 (JS 생성 마크업 포함) */
.imgcomp-tool .text-primary { color: var(--tool-primary) !important; }
.imgcomp-tool .badge.bg-primary { background-color: var(--tool-primary) !important; }
.imgcomp-tool .badge.bg-success { background-color: var(--tool-primary) !important; }
.imgcomp-tool .text-success { color: var(--tool-primary) !important; }
.imgcomp-tool .spinner-border.text-primary { color: var(--tool-primary) !important; }
.imgcomp-tool .form-range::-webkit-slider-thumb { background-color: var(--tool-primary); }
.imgcomp-tool .form-range::-moz-range-thumb { background-color: var(--tool-primary); }
.imgcomp-tool .form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18); }
.imgcomp-tool .form-select:focus,
.imgcomp-tool .form-control:focus {
    border-color: var(--tool-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

/* 액션 버튼 */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 9px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-action:hover {
    border-color: var(--tool-primary);
    color: var(--tool-primary);
    background: var(--tool-bg);
}
.btn-action-sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 8px;
}
.btn-action-primary {
    background: var(--tool-gradient);
    border: none;
    color: #fff;
}
/* CRITICAL hover 고정: 그라데이션 유지, 흰색 텍스트 유지 */
.btn-action-primary:hover {
    background: var(--tool-gradient);
    border: none;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.3);
}

/* JS 결과 카드의 Bootstrap btn-primary 를 테마 그라데이션으로 */
.imgcomp-tool .result-card .btn-primary {
    background: var(--tool-gradient);
    border: none;
    color: #fff;
}
.imgcomp-tool .result-card .btn-primary:hover {
    background: var(--tool-gradient);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* 드래그 앤 드롭 영역 (기능 CSS 재테마) */
.drop-zone {
    border: 2px dashed #cbd5d0;
    background-color: var(--tool-bg);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--tool-primary);
    background-color: rgba(5, 150, 105, 0.08);
}
.drop-zone.drag-over .drop-zone-content i {
    transform: scale(1.15);
}
.drop-zone-content i {
    transition: transform 0.3s ease;
}

/* 결과 카드 */
.result-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(5, 150, 105, 0.15) !important;
}
.result-card .thumbnail-wrapper {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background-color: #f0f4f2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.result-card .thumbnail-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 압축률 뱃지 */
.compression-badge {
    font-size: 0.85rem;
}

/* 프로그레스 바 */
.compress-progress {
    height: 4px;
}
.imgcomp-tool .progress-bar {
    background-color: var(--tool-primary);
}

/* 서포트 카드 */
.support-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    overflow: hidden;
}
.support-card .card-hd {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 15px;
    border-bottom: 1px solid #f1f3f5;
}
.support-card .card-bd {
    padding: 18px;
}
.support-subtitle {
    font-size: 15px;
    font-weight: 700;
    color: #343a40;
    margin: 18px 0 10px;
}

/* 아코디언 */
.imgcomp-tool .accordion-button:not(.collapsed) {
    background-color: var(--tool-bg);
    color: var(--tool-primary);
    box-shadow: none;
}
.imgcomp-tool .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(5, 150, 105, 0.2);
}

/* 다크 모드 대응 */
[data-bs-theme="dark"] .editor-card { background: #1c1f23; border-color: #343a40; }
[data-bs-theme="dark"] .drop-zone {
    border-color: #495057;
    background-color: rgba(5, 150, 105, 0.08);
}
[data-bs-theme="dark"] .drop-zone:hover,
[data-bs-theme="dark"] .drop-zone.drag-over {
    background-color: rgba(5, 150, 105, 0.14);
}
[data-bs-theme="dark"] .result-card .thumbnail-wrapper {
    background-color: #2b2b2b;
}
[data-bs-theme="dark"] .support-card { background: #1c1f23; border-color: #343a40; }

/* 반응형 */
@media (max-width: 768px) {
    .imgcomp-hero { padding: 28px 20px; border-radius: 12px; }
    .imgcomp-hero h1 { font-size: 22px; }
    .editor-card .editor-body { padding: 16px; }
}
