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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: rgba(79, 70, 229, 0.08);
    --secondary-color: #7c3aed;
    --accent-color: #f59e0b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.12);

    --container-width: 1280px;
    --header-height: 80px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --primary-soft: rgba(129, 140, 248, 0.15);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

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

.text-center {
    text-align: center;
}

/* Header & Navigation */
header {
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
}

.nav-wrapper {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo span {
    color: var(--primary-color);
}

.logo:hover {
    transform: translateY(-1px);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.85rem 1.25rem 0.85rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: #f1f5f9;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.search-bar i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 7rem 0 5rem;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.05) 0%, transparent 50%),
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #0f172a 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.75rem;
    }
}

.hero p {
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin: 4rem 0;
}

.category-card {
    background: var(--surface-color);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.category-card i {
    width: 72px;
    height: 72px;
    background: var(--primary-soft);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    transition: all 0.4s ease;
}

.category-card:hover i {
    transform: scale(1.1) rotate(-5deg);
    background: var(--primary-color);
    color: #fff;
}

/* Tool Cards */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.tool-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-premium);
    transform: scale(1.03);
}

.tool-icon-wrapper {
    width: 56px;
    height: 56px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon-wrapper {
    background: var(--primary-color);
    color: #fff;
}

/* Tool Detail Page */
.tool-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    margin-top: 3rem;
}

.tool-container {
    background: var(--surface-color);
    padding: 3.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
}

.tool-header {
    margin-bottom: 3.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3rem;
}

.tool-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

textarea {
    width: 100%;
    min-height: 350px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #f8fafc;
    font-family: 'Inter', monospace;
    font-size: 1.05rem;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-soft);
    outline: none;
}

.actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Ad Slots */
.ad-slot {
    background: transparent;
    border: none;
    padding: 0;
    margin: 1.5rem 0;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 6rem 0 3rem;
    margin-top: 10rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

footer h4 {
    color: #fff;
    margin-bottom: 2rem;
}

footer a {
    color: #94a3b8;
    text-decoration: none;
    display: block;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 5rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.95rem;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    max-width: 500px;
    z-index: 9999;
}

/* Enhanced Aesthetics */
.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #0f172a;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: url('../img/hero-bg.png') no-repeat center center;
    background-size: contain;
    transform: translateY(-50%);
    opacity: 0.4;
    filter: blur(2px);
    z-index: 1;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    background: linear-gradient(135deg, #fff 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.category-card {
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.btn-primary,
button:not(.case-btn) {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    border: none;
}

.btn-primary:hover,
button:not(.case-btn):hover {
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
}

/* Visual Fingerprinting Core */
:root {
    --bg-rotation: 0deg;
    --bg-hue: 0%;
    --font-main: 'Inter', sans-serif;
}

body {
    font-family: var(--font-main);
}

.hero::after {
    transform: translateY(-50%) rotate(var(--bg-rotation));
    filter: blur(2px) hue-rotate(var(--bg-hue));
}

/* Stylish Premium Icons */
.premium-icon-box {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    position: relative;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08);
    z-index: 1;
    overflow: hidden;
}

.premium-icon-box i {
    z-index: 2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
}

.premium-icon-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), transparent);
    z-index: 1;
    opacity: 0.5;
}

.premium-icon-box::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.12;
    z-index: -1;
    transition: opacity 0.3s;
}

.tool-card:hover .premium-icon-box {
    transform: translateY(-5px) scale(1.05) rotate(5deg);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.15);
}

.tool-card:hover .premium-icon-box i {
    transform: scale(1.1);
}

.tool-card:hover .premium-icon-box::before {
    opacity: 0.25;
}

/* Dynamic Color Sets for Icons */
.icon-red i {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    -webkit-background-clip: text;
    background-clip: text;
}

.icon-blue i {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    background-clip: text;
}

.icon-green i {
    background: linear-gradient(135deg, #10b981, #047857);
    -webkit-background-clip: text;
    background-clip: text;
}

.icon-purple i {
    background: linear-gradient(135deg, #8b5cf6, #5b21b6);
    -webkit-background-clip: text;
    background-clip: text;
}

.icon-orange i {
    background: linear-gradient(135deg, #f97316, #c2410c);
    -webkit-background-clip: text;
    background-clip: text;
}

.icon-pink i {
    background: linear-gradient(135deg, #ec4899, #be185d);
    -webkit-background-clip: text;
    background-clip: text;
}

.icon-cyan i {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
}