/* ============================================
   Quick Tools Platform
   Main Stylesheet - Mobile First
   ============================================ */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Modern Vibrant & Attractive Scheme */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.2s ease-in-out;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 50%, #f5f5f5 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--gray-700);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-2xl) 0;
}

/* ===== HEADER ===== */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%) 1;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    position: relative;
}

.logo {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    z-index: 1;
    animation: gradientFlow 5s ease infinite;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nav {
    display: none;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--gray-700);
    font-weight: 500;
    padding: var(--spacing-sm) 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    z-index: 1;
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-700);
}

/* Language Selector */
.language-selector {
    position: relative;
    display: none;
}

.language-button {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--spacing-xs) var(--spacing-md);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.language-button:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

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

.language-text {
    font-weight: 500;
}

.language-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.language-selector.active .language-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    max-width: 200px;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    z-index: 1001;
    margin-top: var(--spacing-xs);
    scrollbar-width: thin;
    scrollbar-color: var(--gray-400) var(--gray-100);
}

/* Custom scrollbar styling for webkit browsers */
.language-dropdown::-webkit-scrollbar {
    width: 8px;
}

.language-dropdown::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.language-dropdown::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-sm);
}

.language-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

.language-selector.active .language-dropdown {
    display: block;
}

.language-option {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-100);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary);
}

.language-option.active {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--white);
    padding: var(--spacing-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

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

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.hero h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero p {
    color: rgba(255, 255, 255, 0.98);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-lg);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.3);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ===== SEARCH BAR ===== */
.search-section {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e0e7ff 100%);
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    padding-left: 3rem;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea, #764ba2, #f093fb) border-box;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.search-input:focus {
    outline: none;
    border-width: 2px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25), 0 4px 12px rgba(236, 72, 153, 0.15), 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--gray-400);
}

.search-results {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    color: var(--gray-400);
}

/* ===== CARDS ===== */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

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

.card:hover::before {
    left: 100%;
}

.card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2), 0 10px 20px rgba(139, 92, 246, 0.15), 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 50%, #faf5ff 100%);
}

.card:visited {
    color: inherit;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card:hover .card-title {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0;
}

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

.category-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.card:hover .category-icon {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.3));
}

.tool-card {
    position: relative;
}

.tool-card .popular-badge,
.tool-card .new-badge,
.tool-card .hot-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    z-index: 10;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.tool-card .popular-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #ec4899 100%);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.5), 0 2px 6px rgba(255, 107, 107, 0.4);
    animation: pulseGlow 2s ease-in-out infinite;
}

.tool-card .new-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5), 0 2px 6px rgba(5, 150, 105, 0.4);
    animation: pulseGlowGreen 2s ease-in-out infinite;
}

.tool-card .hot-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6), 0 2px 6px rgba(217, 119, 6, 0.5);
    animation: pulseGlowOrange 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(236, 72, 153, 0.5), 0 2px 6px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 6px 20px rgba(236, 72, 153, 0.7), 0 4px 12px rgba(255, 107, 107, 0.6);
    }
}

@keyframes pulseGlowGreen {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5), 0 2px 6px rgba(5, 150, 105, 0.4);
    }
    50% {
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.7), 0 4px 12px rgba(5, 150, 105, 0.6);
    }
}

@keyframes pulseGlowOrange {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6), 0 2px 6px rgba(217, 119, 6, 0.5);
    }
    50% {
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.8), 0 4px 12px rgba(217, 119, 6, 0.7);
    }
}

.tool-card.has-badge {
    padding-top: 2.5rem;
}

.tool-card.has-badge .card-title {
    margin-top: 0;
    padding-right: 4.5rem;
    word-wrap: break-word;
}

/* Desktop optimizations for tool cards */
@media (min-width: 768px) {
    .tool-card {
        min-height: 140px;
        display: flex;
        flex-direction: column;
    }
    
    .tool-card .card-title {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .tool-card .card-description {
        font-size: 0.875rem;
        line-height: 1.5;
        flex-grow: 1;
    }
    
    .tool-card.has-badge .card-title {
        padding-right: 5rem;
    }
}

@media (min-width: 1024px) {
    .tool-card {
        min-height: 150px;
    }
    
    .tool-card .card-title {
        font-size: 1.25rem;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-family: var(--font-primary);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    color: var(--white);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4), 0 4px 8px rgba(236, 72, 153, 0.3);
    border: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    background-position: right center;
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.5), 0 6px 12px rgba(236, 72, 153, 0.4);
    transform: translateY(-2px) scale(1.05);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    color: var(--gray-800);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===== TOOL PAGE ===== */
/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm) 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--secondary);
    text-decoration: underline;
    transform: translateX(2px);
}

.breadcrumb span {
    color: var(--gray-700);
    font-weight: 500;
}

.breadcrumb > * + * {
    margin-left: var(--spacing-xs);
}

.tool-header {
    padding: var(--spacing-xl) 0;
    border-bottom: 1px solid var(--gray-200);
}

.tool-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.tool-description {
    color: var(--gray-600);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

.trust-line {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: #059669;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-radius: var(--radius-md);
    border: 2px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    backdrop-filter: blur(10px);
}

.tool-container {
    max-width: 900px;
    margin: var(--spacing-xl) auto;
}

.tool-box {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), linear-gradient(135deg, #667eea20, #764ba220, #f093fb20);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.tool-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.input-group {
    margin-bottom: var(--spacing-lg);
}

.input-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-700);
}

.input-field,
.textarea-field {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
}

.input-field:focus,
.textarea-field:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--white);
}

.textarea-field {
    min-height: 200px;
    resize: vertical;
}

.input-field:focus,
.textarea-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.button-group {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-lg);
}

.output-group {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
}

.output-label {
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-700);
}

.output-field {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--gray-50);
    font-size: 1rem;
    font-family: var(--font-primary);
    min-height: 200px;
    word-wrap: break-word;
}

.preset-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.preset-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.preset-btn:hover {
    background: var(--gray-200);
}

/* ===== INFO SECTIONS ===== */
.info-section {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid var(--gray-200);
}

.info-section h3 {
    margin-bottom: var(--spacing-md);
}

.steps-list {
    list-style: none;
    counter-reset: step-counter;
}

.steps-list li {
    counter-increment: step-counter;
    margin-bottom: var(--spacing-md);
    padding-left: 2.5rem;
    position: relative;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.faq-list {
    list-style: none;
}

.faq-item {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
}

.faq-question {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-900);
}

.faq-answer {
    color: var(--gray-600);
}

.disclaimer-box {
    background: var(--gray-50);
    border-left: 4px solid var(--warning);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 50%, #020617 100%);
    color: var(--gray-300);
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
    margin-top: var(--spacing-2xl);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%) 1;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: 0.3px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--gray-300);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-links a:hover {
    color: #818cf8;
    padding-left: var(--spacing-sm);
    text-shadow: 0 0 8px rgba(129, 140, 248, 0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-800);
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.hidden { display: none; }
.visible { display: block; }

/* ===== RESPONSIVE ===== */
/* Tablet: 2 columns gallery view */
@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        display: grid !important;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 4 columns gallery view for Tool Categories and Popular Tools */
@media (min-width: 768px) {
    html {
        font-size: 17px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .header-content {
        grid-template-columns: 1fr auto 1fr;
        display: grid;
        align-items: center;
    }
    
    .logo {
        justify-self: start;
    }
    
    .nav {
        display: block;
        justify-self: center;
    }
    
    .header-right {
        justify-self: end;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .language-selector {
        display: block;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    /* Gallery view for all card grids on desktop */
    .card-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: var(--spacing-xl);
    }
    
    /* Categories grid - 4 columns */
    #categories-grid.card-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* Popular tools grid - 4 columns */
    #popular-tools-grid.card-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .button-group {
        flex-wrap: nowrap;
    }
}

/* Mobile: Hamburger left, logo center, language right */
@media (max-width: 767px) {
    .header-content {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .logo {
        justify-self: center;
        grid-column: 2;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        grid-column: 1;
        justify-self: start;
    }
    
    .header-right {
        grid-column: 3;
        justify-self: end;
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .language-selector {
        display: block;
    }
    
    .language-button {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.75rem;
    }
    
    .language-text {
        display: none;
    }
    
    .language-icon {
        font-size: 1.25rem;
    }
    
    .language-arrow {
        display: none;
    }
}

/* Large Desktop: Maintain 4 columns gallery view with better spacing */
@media (min-width: 1024px) {
    .container {
        padding: 0 var(--spacing-xl);
        max-width: 1280px;
        margin: 0 auto;
    }
    
    .card-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: var(--spacing-xl);
        display: grid !important;
    }
    
    #categories-grid.card-grid,
    #popular-tools-grid.card-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .card {
        padding: var(--spacing-xl);
    }
}

/* Extra Large Desktop: Maintain 4 columns gallery view */
@media (min-width: 1280px) {
    .container {
        max-width: 1400px;
    }
    
    .card-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        display: grid !important;
    }
    
    #categories-grid.card-grid,
    #popular-tools-grid.card-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* All Tools Section - Desktop Grid View */
.all-tools-section {
    display: none;
}

@media (min-width: 768px) {
    .all-tools-section {
        display: block;
        background: var(--white);
    }
    
    .all-tools-section .card-grid,
    .all-tools-section .all-tools-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    .all-tools-section .card-grid,
    .all-tools-section .all-tools-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

