/* Catalog Page Specific Styles */
/* Herda estilos base do main.css */

/* Background & Body */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background gradiente sutil */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(59, 130, 246, 0.02) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Ghost Silhouette Background - Centralizado igual ao Index */
.ghost-silhouette {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 800px;
    background-image: url('../dist/images/ghost-app-mascote.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    opacity: 0.12;
    filter: grayscale(100%) brightness(0.4);
    animation: ghostFloat 20s ease-in-out infinite;
    transform-origin: center center;
    z-index: 0;
    pointer-events: none;
}

@keyframes ghostFloat {
    0% {
        transform: translate(-50%, -50%) rotate(-3deg) scale(0.95);
        opacity: 0.1;
    }

    25% {
        transform: translate(-55%, -55%) rotate(3deg) scale(1.02);
        opacity: 0.14;
    }

    50% {
        transform: translate(-60%, -60%) rotate(-3deg) scale(1.08);
        opacity: 0.16;
    }

    75% {
        transform: translate(-55%, -55%) rotate(3deg) scale(1.02);
        opacity: 0.14;
    }

    100% {
        transform: translate(-50%, -50%) rotate(-3deg) scale(0.95);
        opacity: 0.1;
    }
}

/* Catalog Header */
.catalog-header {
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.catalog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: radial-gradient(ellipse at center top, rgba(59, 130, 246, 0.15), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.back-btn {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 100;
}

.back-btn:hover {
    background: #3b82f6;
    color: #fff;
    transform: translateX(-3px);
}

.catalog-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.catalog-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

.tools-count {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* Package Tabs */
.package-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tab-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
}

.tab-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

.tab-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

.tab-btn.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Search & Filters */
.controls {
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #3b82f6;
    font-size: 1.1rem;
}

.controls .search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 15px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.controls .search-input:focus {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.controls .search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: #fff;
    transform: scale(1.05);
}

/* Tools Grid - Compact Layout */
.tools-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.8rem;
    position: relative;
    z-index: 10;
}

/* Cards - Estilo Compacto Horizontal */
.tool-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-card:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

.tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.tool-icon img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.tool-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tool-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.tool-category {
    font-size: 0.65rem;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    display: inline-block;
}

.tool-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-arrow {
    color: #3b82f6;
    transform: translateX(3px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #3b82f6;
}

/* Modal Styles */
.tool-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tool-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    transition: transform 0.3s ease;
}

.tool-modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #fff;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.modal-category {
    font-size: 0.8rem;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
}

.modal-desc {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .back-btn {
        position: static;
        margin-bottom: 1rem;
        display: inline-flex;
    }

    .catalog-title {
        font-size: 1.6rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== FOOTER ========== */
.footer {
    background: transparent;
    padding: 3rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    z-index: 20;
    margin-top: 2rem;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    margin-bottom: 0.5rem;
}

.footer-logo-img {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(59, 130, 246, 0.3));
    transition: transform 0.3s ease;
}

.footer-logo-img:hover {
    transform: scale(1.05);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #3b82f6;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.6rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.footer-copyright p {
    margin: 0;
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.social-icon:hover {
    background: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

/* Logo no Topo do Catálogo */
.catalog-top-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.catalog-top-logo .top-logo-img {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 10px 40px rgba(59, 130, 246, 0.4));
}