/* 
   Template Manager Pro - Premium Design System
   Theme: Dark Glassmorphism
   Font: Outfit (Google Fonts)
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Core Colors */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #ec4899;
    --accent: #06b6d4;

    /* Text Colors */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-highlight: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-dark: linear-gradient(to bottom, #0f172a, #020617);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-darker);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animation */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 25%);
    filter: blur(40px);
    animation: bgPulse 10s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-highlight);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 120px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 100px;
    color: #c4b5fd;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Search Box */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 20px 60px 20px 30px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: white;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    bottom: 10px;
    width: 50px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Filter Buttons */
.filter-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Template Cards */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.template-preview-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}

.template-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover .template-img {
    transform: scale(1.1);
}

.preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.glass-card:hover .preview-overlay {
    opacity: 1;
}

.btn-preview {
    padding: 12px 24px;
    background: white;
    color: black;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.glass-card:hover .btn-preview {
    transform: translateY(0);
}

.template-content {
    padding: 24px;
}

.template-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tag-badge {
    font-size: 0.75rem;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.price-period {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Buttons */
.btn-premium {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-premium:hover::before {
    left: 100%;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
}

.btn-outline-premium {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-outline-premium:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: white;
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

/* Pricing Cards */
.pricing-card {
    position: relative;
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-color: rgba(139, 92, 246, 0.3);
}

.pricing-card.featured::before {
    content: 'MAIS POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .template-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .filter-scroll {
        justify-content: flex-start;
        padding-bottom: 20px;
    }
}

/* Custom Tooltip */
[data-title] {
    position: relative;
    cursor: pointer;
}

[data-title]:hover::after {
    content: attr(data-title);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Action Icons */
.action-icon-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-icon:hover {
    transform: translateY(-2px);
    color: white;
}

.btn-icon.primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-icon.success:hover {
    background: #10b981;
    border-color: #10b981;
}

.btn-icon.danger:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.btn-icon.warning:hover {
    background: #f59e0b;
    border-color: #f59e0b;
}

.btn-icon.info:hover {
    background: #0ea5e9;
    border-color: #0ea5e9;
}

/* Status Dot */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.on {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-dot.off {
    background: #64748b;
}

.status-dot.pending {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Modal Help */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.help-item {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}