/* ========================================
   HERM&HERM Service-Tools - Modern Design
   ======================================== */

/* CSS Variables */
:root {
    --primary-dark: #1e3a8a;
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-lighter: #60a5fa;
    --accent: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-dark: #0f172a;
    --bg-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #0ea5e9 100%);
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
    
    --container-width: 1280px;
    --header-height: 70px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
}

.logo-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.nav-cta {
    background: var(--primary);
    color: var(--text-white) !important;
}

.nav-cta:hover {
    background: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: calc(var(--header-height) + 60px) 0 40px;
    text-align: center;
    color: var(--text-white);
}

.hero h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: clamp(16px, 2.5vw, 20px);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px;
}

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.search-icon {
    position: absolute;
    left: 20px;
    width: 20px;
    height: 20px;
    color: var(--text-light);
    pointer-events: none;
}

.search-box input {
    flex: 1;
    padding: 18px 50px 18px 52px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-light);
}

.search-clear {
    position: absolute;
    right: 16px;
    width: 28px;
    height: 28px;
    background: var(--border);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.search-clear.visible {
    opacity: 1;
}

.search-clear:hover {
    background: var(--text-light);
    color: var(--text-white);
}

.search-help {
    margin-top: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.95);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-help strong {
    color: #1f2937;
}

.search-help code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #2563eb;
    font-weight: 600;
}

/* ========================================
   Filter Section
   ======================================== */
.filters {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: var(--header-height);
    z-index: 100;
    transition: all 0.3s ease;
    max-height: 500px;
    overflow: hidden;
    opacity: 1;
}

.filters.hidden {
    max-height: 0;
    opacity: 0;
    padding: 0;
    border: none;
}

.filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 80px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

/* Sort buttons */
.sort-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sort-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.sort-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

.sort-arrow {
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s;
}

.results-info {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.results-info span {
    font-weight: 600;
    color: var(--primary);
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    padding: 40px 0 80px;
}

/* Quick Categories */
.quick-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.quick-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.quick-cat:hover {
    background: var(--bg-card);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-cat-icon {
    font-size: 20px;
}

/* Tools Grid */
/* Folders List - Full Width, Stacked */
.folders-list {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.folders-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

/* Files Grid - Ultra Compact, 4-5 Columns */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-width: 100%;
}

@media (min-width: 1400px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Tool Card */
.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-lighter);
}

/* Compact File Card with Preview */
.tool-card.compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    height: auto;
    min-height: 120px;
}

.tool-card.compact .card-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tool-card.compact .tool-name {
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: 600;
    line-height: 1.2;
}

.tool-card.compact .tool-description {
    font-size: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    line-height: 1.3;
}

.tool-card.compact .tool-footer {
    margin-top: auto;
}

.tool-card.compact .tool-actions {
    gap: 6px;
}

.tool-card.compact .btn {
    padding: 6px 12px;
    font-size: 11px;
    gap: 4px;
}

.tool-card.compact .type-badge,
.tool-card.compact .tool-version,
.tool-card.compact .tool-size,
.tool-card.compact .tool-date {
    font-size: 9px;
    padding: 2px 6px;
}

.tool-card.compact .tool-info {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 10px;
}

/* Preview Thumbnails - Smaller for Compact View */
.preview-thumbnail {
    width: 100%;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.preview-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

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

/* Text Preview Snippets - Hidden for Ultra Compact View */
.preview-text-snippet {
    display: none;
}

.preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-light);
}

/* Compact Folder Cards - Single Line, Transparent, Fully Clickable, Smaller */
.tool-card[data-type="folder"] {
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    min-height: auto;
    height: 60px;
    max-height: 60px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.tool-card[data-type="folder"]:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.tool-card[data-type="folder"]:hover .folder-badge {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Folder Icon with Badge Wrapper */
.folder-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card[data-type="folder"] .tool-icon {
    font-size: 32px;
    flex-shrink: 0;
    margin: 0;
    background: none !important;
    width: auto;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Badge on folder icon */
.folder-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
    border: 2px solid white;
}

.tool-card[data-type="folder"] .tool-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    color: var(--primary-dark);
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.tool-card.compact .tool-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.tool-icon.exe { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.tool-icon.msi { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.tool-icon.zip { background: linear-gradient(135deg, #f59e0b, #d97706); }
.tool-icon.script { background: linear-gradient(135deg, #10b981, #059669); }
.tool-icon.reg { background: linear-gradient(135deg, #ef4444, #dc2626); }
.tool-icon.txt { background: linear-gradient(135deg, #64748b, #475569); }
.tool-icon.url { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.tool-icon.folder { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.tool-icon.lnk { background: linear-gradient(135deg, #a855f7, #7c3aed); }

.tool-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.tool-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.tool-version {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-lighter);
    color: var(--text-white);
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    margin-left: 8px;
}

.tool-category {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.tool-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}

.tool-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tool-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-light);
}

.tool-actions {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

.btn-icon {
    padding: 10px;
}

/* Type Badge */
.type-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--border);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

/* ========================================
   Folders Section
   ======================================== */
.folders-section {
    margin-top: 60px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 24px;
}

.section-icon {
    font-size: 28px;
}

.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.folder-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.folder-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.folder-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.folder-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.folder-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.folder-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.folder-info .folder-count {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    background: var(--primary-light);
    color: var(--text-white);
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .quick-categories {
        justify-content: center;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-card);
        padding: 20px;
        flex-direction: column;
        gap: 10px;
        box-shadow: var(--shadow-lg);
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding: calc(var(--header-height) + 40px) 0 30px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .search-box input {
        padding: 14px 45px 14px 48px;
        font-size: 15px;
    }
    
    .filters {
        padding: 16px 0;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group label {
        min-width: auto;
    }
    
    .filter-buttons {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        flex-shrink: 0;
    }
    
    .quick-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        margin: 0 -20px 30px;
        padding: 0 20px 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .quick-cat {
        flex-shrink: 0;
    }
    
    .folders-list-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    /* Compact cards on mobile: preview below (not beside) */
    .tool-card.compact {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        max-height: none;
    }
    
    .preview-thumbnail,
    .preview-text-snippet {
        width: 100%;
        max-width: 100%;
        margin-top: 12px;
    }
    
    .tool-card-header {
        gap: 12px;
    }
    
    .tool-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .folders-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .tool-name {
        font-size: 15px;
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeIn 0.3s ease forwards;
}

.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(5) { animation-delay: 0.25s; }
.tool-card:nth-child(6) { animation-delay: 0.3s; }

/* Print Styles */
@media print {
    .header,
    .filters,
    .quick-categories,
    .search-container,
    .footer {
        display: none;
    }
    
    .hero {
        padding: 20px 0;
        background: none;
        color: #000;
    }
    
    .main-content {
        padding: 0;
    }
    
    .tool-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========================================
   Preview Modal
   ======================================== */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.2s;
}

.preview-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.preview-modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

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

.preview-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: var(--transition);
}

.preview-close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.preview-modal-body {
    flex: 1;
    overflow: auto;
    padding: 20px;
    min-height: 300px;
    max-height: calc(90vh - 180px);
}

.preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

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

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

.preview-loading p {
    margin-top: 20px;
    color: var(--text-secondary);
}

.preview-image {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius);
}

.preview-text {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-primary);
    max-height: 600px;
    overflow: auto;
}

.preview-pdf {
    width: 100%;
    height: 70vh;
    border: none;
    border-radius: var(--radius);
}

.preview-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.preview-error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.preview-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px;
    border-top: 1px solid var(--border);
}

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

/* Mobile adjustments */
@media (max-width: 768px) {
    .preview-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .preview-modal-body {
        max-height: calc(95vh - 180px);
    }
}

/* ========================================
   TABLE VIEW
   ======================================== */

.files-table-section {
    margin-top: 20px;
}

.tools-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tools-table thead {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
}

.tools-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.tools-table th:hover {
    background: rgba(255,255,255,0.1);
}

.tools-table th::after {
    content: ' ↕';
    opacity: 0.5;
    font-size: 12px;
}

.tools-table tbody tr {
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.tools-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.tools-table td {
    padding: 14px 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
}

.table-icon-cell {
    font-size: 28px;
    width: 50px;
}

.table-name-cell {
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.table-category-cell {
    color: rgba(255, 255, 255, 0.85);
}

.table-size-cell, .table-date-cell {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
}

.table-icon-cell {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* View Toggle Buttons */
.view-btn {
    padding: 8px 16px;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: #64748b;
    transition: all 0.2s;
}

.view-btn:hover {
    background: #e2e8f0;
}

.view-btn.active {
    background: white;
    border-color: #3b82f6;
    color: #1e3a8a;
}

/* ========================================
   HOVER PREVIEW POPUP
   ======================================== */

.hover-preview {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) scale(0.95);
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    width: 450px;
    max-width: calc(100vw - 40px);
    max-height: 600px;
    overflow-y: auto;
    border: 2px solid #3b82f6;
}

.hover-preview.visible {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.hover-preview-title {
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 12px;
    font-size: 15px;
}

.hover-preview-content {
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}

.hover-preview-image {
    width: 100%;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hover-preview-text {
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #1e293b;
    max-height: none;
    overflow: visible;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

.hover-preview-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #f8fafc);
}

.hover-preview-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.hover-preview-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hover-preview-meta-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

.hover-preview-meta-value {
    font-size: 13px;
    color: #1e293b;
    font-weight: 600;
}

.hover-preview-hint {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    color: #3b82f6;
    font-size: 12px;
    font-weight: 600;
}

/* Responsive Hover Preview */
@media (max-width: 1400px) {
    .hover-preview {
        right: 10px;
        width: 400px;
    }
}

@media (max-width: 1200px) {
    .hover-preview {
        right: 50%;
        transform: translateX(50%) translateY(-50%) scale(0.95);
        width: 90%;
        max-width: 500px;
    }
    
    .hover-preview.visible {
        transform: translateX(50%) translateY(-50%) scale(1);
    }
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-exe { background: #9ACD32; color: white; }
.badge-zip { background: #FF1493; color: white; }
.badge-msi { background: #00BFFF; color: white; }
.badge-pdf { background: #FF0000; color: white; }
.badge-jpg { background: #FFA500; color: white; }
.badge-png { background: #00CED1; color: white; }
.badge-txt { background: #808080; color: white; }
.badge-reg { background: #DC143C; color: white; }

/* Folder rows in table */
.tools-table tbody tr[data-tool-type="folder"] {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
    font-weight: 600;
}

.tools-table tbody tr[data-tool-type="folder"]:hover {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.35) 0%, rgba(255, 215, 0, 0.15) 100%);
}

.tools-table tbody tr[data-tool-type="folder"] .table-icon-cell {
    font-size: 32px;
}

/* Additional Badge Colors */
.badge-cmd { background: #10b981; color: white; }
.badge-bat { background: #10b981; color: white; }
.badge-ps1 { background: #3b82f6; color: white; }
.badge-lnk { background: #a855f7; color: white; }
.badge-url { background: #0ea5e9; color: white; }
.badge-ini { background: #808080; color: white; }
.badge-cfg { background: #808080; color: white; }

/* Version column */
.table-version-cell {
    color: #93c5fd;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Additional File Type Badges */
.badge-xml { background: #f59e0b; color: white; }
.badge-json { background: #f59e0b; color: white; }
.badge-html { background: #e11d48; color: white; }
.badge-css { background: #3b82f6; color: white; }
.badge-js { background: #eab308; color: white; }
.badge-log { background: #808080; color: white; }
