:root {
    --bg-dark: #06120e;
    --glass-bg: rgba(6, 18, 14, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --primary: #10b981; /* Verde Esmeralda/Floresta claro para dar destaque no dark mode */
    --primary-hover: #059669;
    --secondary: #1e293b;
    --secondary-hover: #334155;
    --accent: #6366f1; /* Indigo/Roxo */
    --accent-hover: #4f46e5;
    --success: #34d399;
    --danger: #ef4444;
    
    --surface: #0f172a;
    --gradient-accent: linear-gradient(135deg, var(--primary), var(--accent));
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background: var(--primary);
}

.blob-2 {
    bottom: -10%; right: -10%;
    width: 40vw; height: 40vw;
    background: var(--accent);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Layout Structure */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 100vh;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.app-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-weight: 500;
}

.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
    flex: 1;
}

.left-panel, .right-panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 2rem 1rem;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(0,0,0,0.2);
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
}

.upload-area.dragover {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { border-color: rgba(124, 58, 237, 0.5); }
    50% { border-color: rgba(124, 58, 237, 1); }
    100% { border-color: rgba(124, 58, 237, 0.5); }
}

.hidden-input {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Pool Grid */
.pool-actions {
    display: flex;
    gap: 0.5rem;
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

.thumbnail-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-item .filename {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 0.6rem;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumbnail-item.selected {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.thumbnail-item.in-group {
    border-color: var(--success);
    opacity: 0.6;
    pointer-events: none;
}

.thumbnail-remove {
    position: absolute;
    top: 4px; right: 4px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
}

.thumbnail-item:hover .thumbnail-remove {
    opacity: 1;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255,255,255,0.1);
}

/* Groups Area */
.grouping-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.groups-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    flex: 1;
}

.group-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Slim Layout Classes */
.slim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.slim-footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.group-count {
    font-size: 0.75rem;
    background: var(--glass-bg);
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--text-muted);
}

.group-images {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-height: 60px;
    background: rgba(255,255,255,0.02);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.group-thumb-wrapper {
    position: relative;
    width: 65px;
    height: 65px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: grab;
    transition: var(--transition);
    border: 2px solid transparent;
}
.group-thumb-wrapper:active {
    cursor: grabbing;
}
.group-thumb-wrapper.drag-over {
    border-color: var(--primary);
    transform: scale(1.08);
}
.group-thumb-wrapper img.group-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.group-thumb-rotate, .group-thumb-del {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.75);
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.1s ease;
    z-index: 5;
}
.group-thumb-rotate {
    top: 4px;
    left: 4px;
}
.group-thumb-del {
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.85);
}
.group-thumb-wrapper:hover .group-thumb-rotate,
.group-thumb-wrapper:hover .group-thumb-del {
    opacity: 1;
}
.group-thumb-rotate:hover, .group-thumb-del:hover {
    transform: scale(1.15);
}

.group-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

select {
    background: var(--secondary);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    font-size: 0.85rem;
    outline: none;
}

.group-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    outline: none;
}

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.w-full { width: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}
.btn-secondary:hover { background: var(--secondary-hover); }

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}
.btn-outline:hover { background: rgba(255,255,255,0.05); }

.btn-danger-icon {
    background: transparent;
    color: var(--text-muted);
    padding: 0.25rem;
    font-size: 1.25rem;
}
.btn-danger-icon:hover { color: var(--danger); transform: scale(1.1); }

.btn-export-all {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}
.btn-export-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

/* Footer */
.app-footer {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.copyright {
    font-size: 0.75rem;
    opacity: 0.6;
}

.copyright strong {
    color: var(--primary);
    letter-spacing: 0.5px;
}

.disclaimer-link {
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0.6;
    transition: var(--transition);
}
.disclaimer-link:hover {
    color: var(--primary);
    opacity: 1;
}

.disclaimer-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.disclaimer-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.disclaimer-section p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.disclaimer-section ul {
    list-style: none;
    margin-top: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.disclaimer-section li {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}

.disclaimer-section li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.disclaimer-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.text-danger {
    color: var(--danger);
    font-weight: 700;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px; height: 50px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-container {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--accent); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* Help Button */
.btn-help {
    background: rgba(245, 158, 11, 0.15); /* Dourado fraco */
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    white-space: nowrap;
    transition: var(--transition);
}
.btn-help:hover {
    background: rgba(245, 158, 11, 0.3);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* Tutorial Overlay */
.tutorial-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeInOverlay 0.3s ease;
}

.tutorial-overlay.hidden {
    display: none;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tutorial-modal {
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.tutorial-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

/* Steps */
.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.tutorial-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.tutorial-step:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.2);
    transform: translateX(4px);
}

.step-number {
    min-width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.step-content .badge-pro {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: rgba(124, 58, 237, 0.2);
    color: var(--primary);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.badge-beta {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    background: rgba(245, 158, 11, 0.2);
    color: #fde047;
    border: 1px solid rgba(245, 158, 11, 0.4);
    vertical-align: middle;
    margin-left: 0.4rem;
    display: inline-block;
}

.step-content p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Tips */
.tutorial-tips {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.tutorial-tips h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--success);
}

.tutorial-tips ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tutorial-tips li {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.5;
}

.tutorial-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Footer */
.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Home Page Styles */
.hero-section {
    text-align: center;
    padding: 6rem 1rem 4rem 1rem; /* More whitespace */
    margin-bottom: 2rem;
    animation: slideUp 0.6s ease-out;
}
.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}
.hero-section p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
}
.hero-cta {
    display: inline-block;
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #047857);
    border-radius: 50px; /* Pill shape for cleaner look */
    text-decoration: none;
    transition: var(--transition);
}
.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
}
.feature-box {
    text-align: center;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}
.feature-box:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.2);
}
.feature-icon {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
}
.feature-box h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}
.feature-box p {
    font-size: 0.93rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-main);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 1rem 2rem;
}
.tool-card {
    background: rgba(255, 255, 255, 0.015); /* Very subtle background */
    border: 1px solid rgba(255, 255, 255, 0.02); /* Barely visible border */
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
    position: relative;
}
.tool-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.tool-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.tool-icon {
    width: 64px;
    height: 64px;
    background: transparent;
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}
.tool-title {
    font-size: 1.4rem;
    font-weight: 600;
}
.badge-pro {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.tool-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Header Nav */
.top-nav {
    display: flex;
    align-items: center;
}
.top-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}
.top-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}
.top-nav a:hover {
    color: var(--primary);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
/* Responsive */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .upload-area {
        width: 100%;
    }
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .top-nav ul {
        gap: 1rem;
        flex-direction: column;
    }
    .tutorial-modal {
        max-height: 85vh;
        padding: 1.5rem;
    }
    .tutorial-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ==========================================
   NOVAS PÁGINAS DE FERRAMENTAS (Tool Pages)
   ========================================== */

/* Layout genérico para páginas de ferramenta */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.tool-page {
    min-height: 100vh;
    background-color: var(--bg-dark);
}

.tool-main {
    padding: 2rem 0 4rem;
}

/* Slim Header ajustes para novas páginas */
.slim-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #6ee7b7;
    padding: 0.5rem 1.1rem;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-link:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateX(-3px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.back-link .icon {
    font-size: 1.05rem;
    transition: transform 0.2s ease;
}

.back-link:hover .icon {
    transform: translateX(-3px);
}

/* Upload Container (Para as novas ferramentas de PDF) */
.upload-container {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.2);
}

.upload-container:hover,
.upload-container.drag-active {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.08);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.1);
}

.upload-container.drag-active {
    animation: pulse 1.5s infinite;
}

.upload-container .upload-content {
    pointer-events: auto;
}

.upload-container .upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-container h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.upload-container p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Responsive para Tool Pages */
@media (max-width: 768px) {
    .slim-header-content {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    .back-link {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   HEADER INTEGRATED SEARCH & SUPPORT HIGHLIGHT
   ========================================== */

.header-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 320px;
    margin: 0 1rem;
}

.header-search-wrapper input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.4rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
}

.header-search-wrapper input:focus {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.header-search-wrapper .search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    opacity: 0.6;
}

.btn-support-highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-support-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.filter-pills {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.category-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.category-pill:hover,
.category-pill.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--primary);
    color: #6ee7b7;
    transform: translateY(-1px);
}

/* Card Glow Hover */
.tool-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tool-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.15);
    transform: translateY(-6px);
}

/* Modal de Suporte Elegante */
.support-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.support-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.support-modal-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.support-modal-overlay.active .support-modal-card {
    transform: scale(1);
}
