/* ===========================
   Global Layout
=========================== */
body {
    font-family: "Inter", system-ui, sans-serif;
    background-color: #f9fafb;
    color: #1e293b;
}

/* Scroll smooth */
html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    display: block;
}

/* ===========================
   Navigation
=========================== */
header {
    transition: 0.3s ease;
}

/* Mobile Menu */
#menu {
    transition: all .3s ease;
}

/* ===========================
   Tools Panel
=========================== */
.tool-card {
    transition: all 0.25s ease-in-out;
}
.tool-card:hover {
    transform: scale(1.03);
}

/* ===========================
   Drag & Drop Upload
=========================== */
#drop-area {
    transition: all 0.3s ease-in-out;
}
#drop-area.hover {
    border-color: #6366f1;
    background: rgba(99,102,241,0.05);
}

/* ===========================
   Uploaded Images Preview
=========================== */
#uploaded-images img {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

/* ===========================
   Crop Overlay
=========================== */
.crop-overlay {
    border: 1px dashed #6366f1;
    background-color: rgba(99, 102, 241, .1);
    cursor: move;
    position: absolute;
}

.crop-handle {
    width: 10px;
    height: 10px;
    background: #6366f1;
    position: absolute;
    border: 1px solid #fff;
}

/* ===========================
   FAQ
=========================== */
.faq-content {
    animation: slideDown .25s ease forwards;
}

}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px);}
    to { opacity: 1; transform: translateY(0);}
}

/* Icon rotation */
.faq-toggle.active i {
    transform: rotate(180deg);
}

/* ===========================
   Buttons
=========================== */
button {
    transition: .25s;
}

button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* ===========================
   Preview Areas
=========================== */
#processed-image,
#original-image {
    object-fit: contain;
}

/* ===========================
   Upload grid
=========================== */
#uploaded-images {
    transition: .25s;
}

/* ===========================
   Footer
=========================== */
footer {
    user-select: none;
}

/* ===========================
   Utilities
=========================== */
.hover-scale {
    transition: all .25s;
}
.hover-scale:hover {
    transform: scale(1.05);
}
.card-shadow {
    box-shadow: 0 10px 15px rgba(0,0,0,.04),
                0 4px 6px rgba(0,0,0,.06);
}
#lang-wrapper {
  position: relative;
  user-select: none;
}

#lang-menu .lang-item {
  padding: 8px 12px;
  cursor: pointer;
  transition: .2s;
}

#lang-menu .lang-item:hover {
  background: #f3f4f6;
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
/* AI 控件样式 */
#ai-controls { display: flex; align-items: center; gap: .6rem; margin-right: 0.5rem; }
.ai-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: white;
  border: 1px solid #e5e7eb;
  padding: .45rem .75rem;
  border-radius: .5rem;
  font-size: 0.9rem;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(2,6,23,0.04);
}
.ai-btn:disabled { opacity: .6; cursor: not-allowed; }

/* 全屏遮罩 */
#ai-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2,6,23,0.5);
}
#ai-loading-overlay.hidden { display: none; }
.ai-loading-inner {
  background: rgba(255,255,255,0.95);
  padding: 18px 22px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 30px rgba(2,6,23,0.2);
  min-width: 240px;
}

/* spinner */
.ai-loading-inner .spinner{
  width: 36px; height: 36px; border-radius: 50%;
  border: 4px solid rgba(99,102,241,0.15);
  border-top-color: #6366f1;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ai-loading-text{
  font-size: 14px;
  color: #0f172a;
}
