:root {
    --mesh-1: #0b1220;
    --mesh-2: #0e1a2f;
    --mesh-3: #1b2a4a;
    --mesh-4: #0a1020;

    --panel: rgba(255, 255, 255, 0.04);
    --panel-border: rgba(255, 255, 255, 0.1);
    --accent: #7c9cff;
    --accent-2: #4fd1c5;
    --text: #e5e7eb;
    --muted: #aab2c0;
    --radius: 16px;

    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 10% 10%, var(--mesh-3), transparent 60%),
        radial-gradient(900px 500px at 90% 20%, var(--mesh-2), transparent 60%),
        radial-gradient(800px 500px at 30% 90%, #14244a, transparent 60%),
        linear-gradient(180deg, var(--mesh-1), var(--mesh-4));
    background-attachment: fixed;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

.container {
    background: var(--panel);
    backdrop-filter: blur(10px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 900px;
    width: 100%;
}

h1 {
    font-size: 32px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 30px;
    font-size: 14px;
}

.upload-area {
    border: 2px dashed var(--panel-border);
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--panel);
}

.upload-area:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
}

.upload-area.dragover {
    border-color: var(--accent-2);
    background: rgba(255, 255, 255, 0.08);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.upload-text {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.upload-subtext {
    color: var(--muted);
    font-size: 14px;
}

#fileInput {
    display: none;
}

.crop-container {
    display: none;
    margin-top: 30px;
}

.crop-container.active {
    display: block;
}

.crop-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(124, 156, 255, 0.1);
    border: 1px solid rgba(124, 156, 255, 0.2);
    border-radius: 8px;
}

.crop-info-text {
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
}

#imagePreview {
    max-width: 100%;
    max-height: 500px;
    border-radius: 12px;
}

.controls {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 25%, #d946ef 50%, #ec4899 75%, #f43f5e 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
    color: white;
}

.btn-primary:hover {
    background-position: 100% 50%;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--panel-border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* 🧷 Botão flutuante autor */
.floating-author {
  position: fixed;
  bottom: 24px;
  right: 24px;
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;

  color: #f0f0f0;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;

  overflow: hidden;
  white-space: nowrap;

  transition:
    max-width 0.3s ease,
    background 0.2s ease,
    border-color 0.2s ease;

  max-width: 48px;
  /* fechado */
  z-index: 9999;
}

/* Ícone ? */
.floating-author .icon {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1;
}

/* Texto escondido inicialmente */
.floating-author .text {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Hover → expande */
.floating-author:hover {
  max-width: 240px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.floating-author:hover .text {
  opacity: 1;
}

.verdict-emoji {
  display: inline-block;
  border: none;
  padding: 0;
}

/* Desktop: expande no hover */
.floating-author {
  max-width: 48px;
}

.floating-author:hover {
  max-width: 240px;
}

.floating-author .text {
  opacity: 0;
}

.floating-author:hover .text {
  opacity: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 24px;
    }

    .upload-area {
        padding: 40px 15px;
    }

    .controls {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}