/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--gradient-subtle);
    color: var(--foreground);
    min-height: 100vh;
    transition: var(--transition);
}

/* Design System Variables */
:root {
    /* Light Theme Colors */
    --background: hsl(48, 100%, 98%);
    --foreground: hsl(32, 69%, 25%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(32, 69%, 25%);
    --primary: hsl(37, 100%, 44%);
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-glow: hsl(54, 100%, 44%);
    --secondary: hsl(32, 69%, 63%);
    --secondary-foreground: hsl(32, 69%, 25%);
    --muted: hsl(48, 50%, 95%);
    --muted-foreground: hsl(32, 30%, 50%);
    --accent: hsl(81, 88%, 44%);
    --accent-foreground: hsl(0, 0%, 100%);
    --border: hsl(48, 30%, 85%);
    --destructive: hsl(21, 100%, 45%);
    --destructive-foreground: hsl(0, 0%, 100%);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, hsl(37, 100%, 44%), hsl(54, 100%, 44%));
    --gradient-accent: linear-gradient(135deg, hsl(81, 88%, 44%), hsl(123, 47%, 33%));
    --gradient-subtle: linear-gradient(180deg, hsl(48, 100%, 98%), hsl(48, 50%, 95%));
    
    /* Shadows */
    --shadow-card: 0 4px 6px -1px hsl(37, 100%, 44%, 0.15), 0 2px 4px -1px hsl(37, 100%, 44%, 0.1);
    --shadow-elevated: 0 10px 15px -3px hsl(37, 100%, 44%, 0.2), 0 4px 6px -2px hsl(37, 100%, 44%, 0.15);
    
    /* Spacing */
    --radius: 0.75rem;
    --container-padding: 2rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
[data-theme="dark"] {
    /* Dark Theme Colors */
    --background: hsl(240, 10%, 8%);
    --foreground: hsl(0, 0%, 95%);
    --card: hsl(240, 10%, 12%);
    --card-foreground: hsl(0, 0%, 95%);
    --primary: hsl(37, 100%, 54%);
    --primary-foreground: hsl(240, 10%, 8%);
    --primary-glow: hsl(54, 100%, 54%);
    --secondary: hsl(240, 5%, 25%);
    --secondary-foreground: hsl(0, 0%, 95%);
    --muted: hsl(240, 5%, 18%);
    --muted-foreground: hsl(0, 0%, 65%);
    --accent: hsl(81, 88%, 54%);
    --accent-foreground: hsl(240, 10%, 8%);
    --border: hsl(240, 5%, 25%);
    --destructive: hsl(21, 100%, 55%);
    --destructive-foreground: hsl(0, 0%, 95%);
    
    /* Dark Gradients */
    --gradient-primary: linear-gradient(135deg, hsl(37, 100%, 54%), hsl(54, 100%, 54%));
    --gradient-accent: linear-gradient(135deg, hsl(81, 88%, 54%), hsl(123, 47%, 43%));
    --gradient-subtle: linear-gradient(180deg, hsl(240, 10%, 8%), hsl(240, 5%, 12%));
    
    /* Dark Shadows */
    --shadow-card: 0 4px 6px -1px hsl(0, 0%, 0%, 0.3), 0 2px 4px -1px hsl(0, 0%, 0%, 0.2);
    --shadow-elevated: 0 10px 15px -3px hsl(0, 0%, 0%, 0.4), 0 4px 6px -2px hsl(0, 0%, 0%, 0.3);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
.header {
    background: var(--gradient-subtle);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--gradient-primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-card);
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.2;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: calc(var(--radius) - 2px);
    text-decoration: none;
    color: var(--foreground);
    font-size: 0.875rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-link:hover {
    background: var(--muted);
}

.nav-link-active {
    background: var(--card);
    border-color: var(--border);
}

/* Main Content */
.main {
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.nav-tab:hover {
    background: var(--muted);
    color: var(--foreground);
}

.nav-tab-active {
    background: var(--gradient-primary);
    color: var(--primary-foreground);
    box-shadow: var(--shadow-card);
}

.nav-tab-active:hover {
    background: var(--gradient-primary);
    color: var(--primary-foreground);
}

.tab-icon {
    font-size: 1rem;
}

.tab-text {
    font-weight: inherit;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content-active {
    display: block;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 700;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    max-width: 32rem;
    margin: 0 auto;
}

/* Search */
.search-container {
    max-width: 36rem;
    margin: 0 auto 2rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    font-size: 1.25rem;
    color: var(--muted-foreground);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 3rem;
    padding: 0 1rem 0 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    font-size: 1rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsl(37, 100%, 44%, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    min-height: 2.75rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    background: var(--card);
    color: var(--foreground);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px hsl(37, 100%, 44%, 0.15);
}

.btn:active {
    transform: translateY(0); /* neutraliza hover */
    filter: brightness(0.98);
}

.btn[disabled],
.btn:disabled,
.btn.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Variantes */
.btn-primary {
    background: var(--gradient-primary);
    color: var(--primary-foreground);
    box-shadow: var(--shadow-card);
}

.btn-primary:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-1px);
}

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

.btn-accent {
    background: var(--accent);
    color: var(--accent-foreground);
}

.btn-destructive {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

.btn-outline {
    border-color: var(--border);
    color: var(--foreground);
    background: var(--card);
}

.btn-outline:hover {
    background: var(--muted);
}

.btn-ghost {
    background: transparent;
    color: var(--foreground);
}

.btn-ghost:hover {
    background: var(--muted);
}

.btn-link {
    background: transparent;
    border-color: transparent;
    color: var(--primary);
    padding: 0.25rem 0.25rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Tamanhos */
.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-height: 2.25rem;
}

.btn-lg {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    min-height: 3rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
}

/* Estado de carregamento */
.btn.is-loading {
    position: relative;
    pointer-events: none;
}

.btn.is-loading .btn-label {
    opacity: 0.0;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Popular Section */
.popular-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1.25rem;
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    background: var(--card);
    color: var(--foreground);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn:hover {
    background: var(--muted);
}

.category-btn-active {
    background: var(--gradient-primary);
    color: var(--primary-foreground);
    border-color: transparent;
    box-shadow: var(--shadow-card);
}

.category-icon {
    font-size: 1rem;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Tool Card */
.tool-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
}

.tool-card-header {
    padding: 1.5rem 1.5rem 0.75rem;
}

.tool-card-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.tool-card-info {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.tool-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-card);
}

.tool-details h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--card-foreground);
    transition: var(--transition);
    margin-bottom: 0.25rem;
}

.tool-card:hover .tool-details h3 {
    color: var(--primary);
}

.tool-category {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-popular {
    background: var(--accent);
    color: var(--accent-foreground);
}

.badge-outline {
    border: 1px solid var(--border);
    color: var(--foreground);
}

.tool-card-content {
    padding: 0 1.5rem 1.5rem;
}

.tool-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.tool-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tool-actions .btn:not(.btn-sm) {
    flex: 1;
}

.tool-actions .btn-sm {
    flex: none;
}

.tool-actions .btn-sm .icon {
    font-size: 1rem;
    font-weight: bold;
}

/* Web Tools Styles */
.webtools-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.webtools-category {
    cursor: pointer;
    transition: var(--transition);
}

.webtool-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.webtool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--primary);
}

.webtool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.webtool-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.webtool-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

/* Web Tool Interface */
.webtool-interface {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.webtool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--muted);
}

.webtool-interface-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
}

.webtool-content {
    padding: 2rem;
}

/* Web Tool Specific Styles */
.webtool-input-group {
    margin-bottom: 1.5rem;
}

.webtool-input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.webtool-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    resize: vertical;
    transition: var(--transition);
}

.webtool-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsl(37, 100%, 44%, 0.1);
}

.webtool-results {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}

.webtool-results-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.webtool-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.webtool-stat {
    text-align: center;
    padding: 1rem;
    background: var(--card);
    border-radius: calc(var(--radius) - 2px);
}

.webtool-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.webtool-stat-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Image Tool Specific Styles */
.image-tool-option {
    transition: var(--transition);
}

.image-tool-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--primary);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsl(37, 100%, 44%, 0.1);
}

/* Image converter specific styles */
#imageConverter {
    animation: slideIn 0.3s ease-out;
}

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

#conversionResult {
    animation: fadeIn 0.5s ease-out;
}

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

#originalPreview {
    transition: var(--transition);
}

#originalPreview:hover {
    transform: scale(1.02);
}

/* PDF Tools Specific Styles */
.rotate-btn {
    font-size: 0.875rem;
    padding: 0.5rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotate-btn.btn-primary {
    background: var(--gradient-primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* Processing animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PDF processing overlay */
#pdfProcessing {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

#pdfProcessing p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* File input improvements */
input[type="file"] {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--muted);
    cursor: pointer;
    transition: var(--transition);
}

input[type="file"]:hover {
    border-color: var(--primary);
    background: var(--accent);
}

/* PDF options styling */
.webtool-card select {
    margin-bottom: 0.5rem;
}

.webtool-card input[type="number"] {
    text-align: center;
}

/* File list styling */
#mergeFilesUl {
    list-style: none;
    padding: 0;
    background: var(--muted);
    border-radius: var(--radius);
    padding: 1rem;
}

#mergeFilesUl li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--foreground);
}

#mergeFilesUl li:last-child {
    border-bottom: none;
}

/* Admin Styles */
.admin-header {
    margin-bottom: 2rem;
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.admin-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.admin-subtitle {
    color: var(--muted-foreground);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.management-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

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

.management-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
}

.tools-list {
    padding: 1rem;
}

.tool-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.tool-item:hover {
    background: var(--muted);
}

.tool-item-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex: 1;
}

.tool-item-details h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.tool-item-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.tool-item-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tool-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-elevated);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted-foreground);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--muted);
}

/* Form */
.tool-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    background: var(--card);
    color: var(--foreground);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsl(37, 100%, 44%, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.tag-input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--secondary);
    color: var(--secondary-foreground);
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.75rem;
}

.tag-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.tag-remove:hover {
    background: rgba(0, 0, 0, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.form-checkbox {
    margin-top: 0.125rem;
}

.checkbox-text {
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.checkbox-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-results-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.no-results-text {
    color: var(--muted-foreground);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    max-width: 400px;
}

.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-elevated);
    padding: 1rem;
    margin-bottom: 0.5rem;
    transform: translateX(100%);
    transition: var(--transition);
}

.toast.show {
    transform: translateX(0);
}

.toast-title {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.toast-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.toast-success {
    border-left: 4px solid var(--accent);
}

.toast-error {
    border-left: 4px solid var(--destructive);
}

/* Loading */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1200;
    justify-content: center;
    align-items: center;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .nav {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .management-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .tool-item {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .tool-item-actions {
        justify-content: center;
    }
    
    .category-filter {
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }

    .nav-tabs {
        max-width: none;
        margin: 0 0 2rem 0;
    }

    .nav-tab {
        flex: 1;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .tab-text {
        display: none;
    }

    .tab-icon {
        font-size: 1.25rem;
    }

    .webtools-categories {
        grid-template-columns: 1fr;
    }

    .webtool-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

/* Admin Panel Enhancements */
.admin-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    font-size: 0.875rem;
    min-width: 150px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.management-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: var(--primary-foreground);
}

.management-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.management-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.management-count {
    font-size: 0.875rem;
    opacity: 0.9;
}

.management-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bulk-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tools-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--muted);
    border-bottom: 1px solid var(--border);
}

.select-all-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.view-options {
    display: flex;
    gap: 0.25rem;
}

.view-btn {
    padding: 0.5rem;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--foreground);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: var(--muted);
}

.view-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.tools-list {
    padding: 1rem;
}

.tools-list.list-view .tool-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    background: var(--card);
    transition: all 0.2s ease;
}

.tools-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.tools-list.grid-view .tool-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    transition: all 0.2s ease;
}

.tool-item:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.tool-item.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: var(--primary-foreground);
}

.tool-item-checkbox {
    display: flex;
    align-items: center;
}

.tool-checkbox {
    width: 1rem;
    height: 1rem;
}

.tool-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.tool-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tool-item-details {
    flex: 1;
}

.tool-item-details h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-item-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.tool-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tool-tags-count,
.tool-has-url {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    background: var(--muted);
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--radius) / 2);
}

.tool-item-actions {
    display: flex;
    gap: 0.5rem;
}

.tool-item-actions .btn {
    padding: 0.5rem;
    min-width: auto;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted-foreground);
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.no-results-text {
    font-size: 1.125rem;
    font-weight: 500;
}

/* Admin Responsive */
@media (max-width: 768px) {
    .admin-controls {
        padding: 1rem;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        min-width: auto;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .management-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .management-actions {
        justify-content: space-between;
    }
    
    .bulk-actions {
        flex-wrap: wrap;
    }
    
    .tools-list-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .tools-list.grid-view {
        grid-template-columns: 1fr;
    }
    
    .tool-item-info {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .tool-item-meta {
        justify-content: center;
    }
    
    /* Mobile-specific improvements */
    .btn {
        min-height: 44px; /* Tamanho mínimo para touch */
        padding: 0.75rem 1rem;
    }
    
    .nav .btn {
        width: 100%;
        justify-content: center;
    }
    
    .theme-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .search-input {
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        font-size: 16px; /* Previne zoom no iOS */
    }
    
    .tool-card,
    .web-tool-card {
        padding: 1rem;
    }
    
    .tool-card h3,
    .web-tool-card h3 {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .tool-card p,
    .web-tool-card p {
        font-size: 0.875rem;
        line-height: 1.4;
    }
    
    /* Touch-friendly interactions */
    .tool-card:hover,
    .web-tool-card:hover {
        transform: none; /* Remove hover effects em mobile */
    }
    
    .tool-card:active,
    .web-tool-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Mobile navigation improvements */
    .nav-link {
        padding: 0.75rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile form improvements */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile modal improvements */
    .modal-header {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    color: var(--foreground);
}

.theme-toggle:hover {
    background: var(--muted);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.theme-toggle-icon {
    font-size: 1rem;
    transition: var(--transition);
}

.theme-toggle-icon.sun {
    display: block;
}

.theme-toggle-icon.moon {
    display: none;
}

[data-theme="dark"] .theme-toggle-icon.sun {
    display: none;
}

[data-theme="dark"] .theme-toggle-icon.moon {
    display: block;
}

/* Otimização: transições apenas em elementos interativos */
a, button, input, select, textarea, .btn, .nav-link, .category-btn, .tool-card, .webtool-card, .modal {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

/* Performance: will-change para elementos que sofrem transformações frequentes */
.tool-card, .webtool-card, .btn:hover, .modal.active {
    will-change: transform;
}

.spinner {
    will-change: transform;
}

/* Dark mode specific adjustments */
[data-theme="dark"] .hero {
    background: var(--gradient-subtle);
}

[data-theme="dark"] .hero-content h1 {
    color: var(--foreground);
}

[data-theme="dark"] .hero-content p {
    color: var(--muted-foreground);
}

[data-theme="dark"] .search-box {
    background: var(--card);
    border-color: var(--border);
}

[data-theme="dark"] .search-input {
    background: var(--card);
    color: var(--foreground);
}

[data-theme="dark"] .search-input::placeholder {
    color: var(--muted-foreground);
}

[data-theme="dark"] .category-filter {
    background: var(--card);
    border-color: var(--border);
}

[data-theme="dark"] .category-btn {
    background: var(--card);
    color: var(--foreground);
    border-color: var(--border);
}

[data-theme="dark"] .category-btn:hover {
    background: var(--muted);
}

[data-theme="dark"] .category-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

[data-theme="dark"] .tool-card {
    background: var(--card);
    border-color: var(--border);
}

[data-theme="dark"] .tool-card:hover {
    box-shadow: var(--shadow-elevated);
}

[data-theme="dark"] .web-tool-card {
    background: var(--card);
    border-color: var(--border);
}

[data-theme="dark"] .web-tool-card:hover {
    box-shadow: var(--shadow-elevated);
}

[data-theme="dark"] .modal {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .modal-content {
    background: var(--card);
    border-color: var(--border);
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .form-select {
    background: var(--card);
    color: var(--foreground);
    border-color: var(--border);
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus,
[data-theme="dark"] .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary)20;
}

[data-theme="dark"] .toast {
    background: var(--card);
    border-color: var(--border);
    color: var(--foreground);
}

[data-theme="dark"] .toast.success {
    background: var(--accent);
    color: var(--accent-foreground);
}

[data-theme="dark"] .toast.error {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

/* PWA Styles */
.pwa-install-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: slideUpIn 0.3s ease-out;
}

.pwa-install-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.pwa-install-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.pwa-install-text {
    flex: 1;
    min-width: 0;
}

.pwa-install-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 2px;
}

.pwa-install-subtitle {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.3;
}

.pwa-install-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pwa-install-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.pwa-install-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pwa-install-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffc107;
    color: #856404;
    padding: 8px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    z-index: 1001;
    animation: slideDownIn 0.3s ease-out;
}

.offline-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.offline-icon {
    font-size: 16px;
}

.update-notification {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: slideDownIn 0.3s ease-out;
}

.update-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.update-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.update-text {
    flex: 1;
    min-width: 0;
}

.update-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 2px;
}

.update-subtitle {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.3;
}

.update-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.update-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.update-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.update-close:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Dark theme PWA styles */
[data-theme="dark"] .pwa-install-button,
[data-theme="dark"] .update-notification {
    background: #2c3e50;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .pwa-install-title,
[data-theme="dark"] .update-title {
    color: #ecf0f1;
}

[data-theme="dark"] .pwa-install-subtitle,
[data-theme="dark"] .update-subtitle {
    color: #bdc3c7;
}

[data-theme="dark"] .pwa-install-close,
[data-theme="dark"] .update-close {
    color: #bdc3c7;
}

[data-theme="dark"] .pwa-install-close:hover,
[data-theme="dark"] .update-close:hover {
    background: #34495e;
    color: #ecf0f1;
}

/* Animations */
@keyframes slideUpIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDownIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive PWA styles */
@media (max-width: 768px) {
    .pwa-install-button,
    .update-notification {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .pwa-install-content,
    .update-content {
        padding: 12px;
        gap: 8px;
    }
    
    .pwa-install-title,
    .update-title {
        font-size: 13px;
    }
    
    .pwa-install-subtitle,
    .update-subtitle {
        font-size: 11px;
    }
    
    .pwa-install-btn,
    .update-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* PWA status indicators */
.pwa-status {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    z-index: 1002;
    opacity: 0.8;
}

[data-theme="dark"] .pwa-status {
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
}

/* PWA Install Popup Styles */
.pwa-install-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: popupFadeIn 0.3s ease-out;
}

.pwa-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.pwa-popup-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: popupSlideIn 0.3s ease-out;
}

.pwa-popup-header {
    display: flex;
    align-items: center;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e9ecef;
    gap: 12px;
}

.pwa-popup-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.pwa-popup-title {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.pwa-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pwa-popup-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.pwa-popup-body {
    padding: 24px;
}

.pwa-popup-message h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.pwa-popup-message p {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.pwa-popup-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
}

.pwa-benefit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pwa-benefit:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.pwa-benefit-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.pwa-benefit-text {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

.pwa-popup-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px 24px;
    border-top: 1px solid #e9ecef;
}

.pwa-popup-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pwa-popup-btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.pwa-popup-btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.pwa-popup-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pwa-popup-btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.pwa-btn-icon {
    font-size: 16px;
}

.pwa-popup-dismiss {
    padding: 8px 24px 16px 24px;
    text-align: center;
}

.pwa-dismiss-link {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.pwa-dismiss-link:hover {
    color: #495057;
}

/* Dark theme popup styles */
[data-theme="dark"] .pwa-popup-content {
    background: #2c3e50;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .pwa-popup-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .pwa-popup-title {
    color: #ecf0f1;
}

[data-theme="dark"] .pwa-popup-close {
    color: #bdc3c7;
}

[data-theme="dark"] .pwa-popup-close:hover {
    background: #34495e;
    color: #ecf0f1;
}

[data-theme="dark"] .pwa-popup-message h3 {
    color: #ecf0f1;
}

[data-theme="dark"] .pwa-popup-message p {
    color: #bdc3c7;
}

[data-theme="dark"] .pwa-benefit {
    background: #34495e;
}

[data-theme="dark"] .pwa-benefit:hover {
    background: #3d566e;
}

[data-theme="dark"] .pwa-benefit-text {
    color: #bdc3c7;
}

[data-theme="dark"] .pwa-popup-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .pwa-popup-btn-secondary {
    background: #34495e;
    color: #bdc3c7;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .pwa-popup-btn-secondary:hover {
    background: #3d566e;
    color: #ecf0f1;
}

[data-theme="dark"] .pwa-dismiss-link {
    color: #bdc3c7;
}

[data-theme="dark"] .pwa-dismiss-link:hover {
    color: #ecf0f1;
}

/* Popup animations */
@keyframes popupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupSlideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Responsive popup styles */
@media (max-width: 768px) {
    .pwa-install-popup {
        padding: 16px;
    }
    
    .pwa-popup-content {
        max-width: 100%;
    }
    
    .pwa-popup-header {
        padding: 20px 20px 16px 20px;
    }
    
    .pwa-popup-title {
        font-size: 18px;
    }
    
    .pwa-popup-body {
        padding: 20px;
    }
    
    .pwa-popup-message h3 {
        font-size: 16px;
    }
    
    .pwa-popup-benefits {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .pwa-popup-footer {
        flex-direction: column;
        padding: 16px 20px 20px 20px;
    }
    
    .pwa-popup-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .pwa-install-popup {
        padding: 12px;
    }
    
    .pwa-popup-header {
        padding: 16px 16px 12px 16px;
    }
    
    .pwa-popup-body {
        padding: 16px;
    }
    
    .pwa-popup-footer {
        padding: 12px 16px 16px 16px;
    }
}

