/*
Theme Name: NOFYI Tools
Theme URI: https://nofyi.com
Author: NOFYI
Author URI: https://nofyi.com
Description: A colorful, animated, SEO-optimized WordPress theme for NOFYI.com - a worldwide viral tools website with 150+ free online tools. Designed for AdSense approval with unique content, fluid animations, and material design.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nofyi
Tags: tools, colorful, animations, adsense, seo, material-design
*/

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

:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --secondary: #FF6584;
    --accent: #00C9A7;
    --accent2: #FFD93D;
    --accent3: #FF8A5C;
    --dark: #2D3436;
    --gray: #636E72;
    --light-gray: #DFE6E9;
    --white: #FFFFFF;
    --bg: #F8F9FE;
    --shadow: 0 4px 20px rgba(108, 99, 255, 0.15);
    --shadow-hover: 0 8px 30px rgba(108, 99, 255, 0.25);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================
   WORDPRESS DEFAULT OVERRIDES
   Force full-width layout - overrides any
   WordPress built-in styles or plugin styles
   ============================================ */
body.home,
body.blog,
body.archive,
body.single,
body.page,
body.search,
body.error404 {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

#page,
.site,
.site-content,
.hfeed,
.wp-site-blocks {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

/* Override WordPress block editor full-width constraints */
.wp-block-group,
.wp-block-group__inner-container,
.entry-content,
.wp-container {
    max-width: 100% !important;
}

.entry-content {
    width: 100% !important;
}

article {
    max-width: 100% !important;
    width: 100% !important;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

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

@keyframes rotateIn {
    from { transform: rotate(-10deg) scale(0.9); opacity: 0; }
    to { transform: rotate(0deg) scale(1); opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 0.5; }
    100% { transform: scale(4); opacity: 0; }
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(108, 99, 255, 0.3); }
    50% { text-shadow: 0 0 20px rgba(108, 99, 255, 0.6); }
}

@keyframes borderGlow {
    0%, 100% { border-color: var(--primary); box-shadow: 0 0 5px rgba(108, 99, 255, 0.3); }
    50% { border-color: var(--secondary); box-shadow: 0 0 15px rgba(255, 101, 132, 0.3); }
}

.animate-fade-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fade-down { animation: fadeInDown 0.6s ease-out forwards; }
.animate-fade-left { animation: fadeInLeft 0.6s ease-out forwards; }
.animate-fade-right { animation: fadeInRight 0.6s ease-out forwards; }
.animate-scale { animation: scaleIn 0.5s ease-out forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-bounce { animation: bounceIn 0.8s ease-out forwards; }

.stagger-1 { animation-delay: 0.1s; opacity: 0; }
.stagger-2 { animation-delay: 0.2s; opacity: 0; }
.stagger-3 { animation-delay: 0.3s; opacity: 0; }
.stagger-4 { animation-delay: 0.4s; opacity: 0; }
.stagger-5 { animation-delay: 0.5s; opacity: 0; }
.stagger-6 { animation-delay: 0.6s; opacity: 0; }

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(108, 99, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    width: 100%;
    max-width: 100%;
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    animation: fadeInLeft 0.5s ease-out;
}

.site-logo-img {
    height: 44px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: var(--transition);
}

.site-logo:hover .site-logo-img {
    transform: scale(1.02);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.nav-menu a {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-menu a:hover {
    background: rgba(108, 99, 255, 0.08);
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: transform 0.3s ease;
}

.nav-menu a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-toggle:hover {
    background: rgba(108, 99, 255, 0.08);
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, #6C63FF 0%, #5A52D5 25%, #FF6584 50%, #00C9A7 75%, #FFD93D 100%);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    padding: 80px 20px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    animation: fadeInDown 0.8s ease-out;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
    line-height: 1.2;
}

.hero-content h1 span {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.hero-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.hero-search input {
    width: 100%;
    padding: 16px 60px 16px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    outline: none;
    transition: var(--transition);
}

.hero-search input:focus {
    box-shadow: 0 8px 32px rgba(108, 99, 255, 0.3);
    transform: scale(1.02);
}

.hero-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-search button:hover {
    transform: translateY(-50%) scale(1.1);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.hero-stat {
    text-align: center;
    color: white;
}

.hero-stat .stat-number {
    font-size: 2rem;
    font-weight: 800;
    display: block;
}

.hero-stat .stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ============================================
   CATEGORIES / TOOL NAV
   ============================================ */
.categories-bar {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid var(--light-gray);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
}

.categories-bar::-webkit-scrollbar {
    height: 3px;
}

.categories-bar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.categories-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.cat-link {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    border: 1px solid var(--light-gray);
    color: var(--dark);
    text-decoration: none;
    cursor: pointer;
}

.cat-link:hover, .cat-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.cat-link .cat-icon {
    margin-right: 5px;
}

/* ============================================
   TOOLS GRID
   ============================================ */
.tools-section {
    width: 100%;
    max-width: 100%;
    padding: 40px 0;
}

.tools-section > * {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
}

.section-header h2 .gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--gray);
    font-size: 1.05rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.tool-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(108, 99, 255, 0.15);
}

.tool-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
    transition: var(--transition);
}

.tool-card:hover .tool-card-icon {
    transform: scale(1.1) rotate(-5deg);
}

.tool-card-icon.pdf { background: linear-gradient(135deg, #FF6B6B, #EE5A5A); color: white; }
.tool-card-icon.image { background: linear-gradient(135deg, #4ECDC4, #44B3AB); color: white; }
.tool-card-icon.text { background: linear-gradient(135deg, #45B7D1, #3AA5BD); color: white; }
.tool-card-icon.seo { background: linear-gradient(135deg, #6C63FF, #5A52D5); color: white; }
.tool-card-icon.dev { background: linear-gradient(135deg, #2ECC71, #27AE60); color: white; }
.tool-card-icon.convert { background: linear-gradient(135deg, #F39C12, #E67E22); color: white; }
.tool-card-icon.math { background: linear-gradient(135deg, #9B59B6, #8E44AD); color: white; }
.tool-card-icon.social { background: linear-gradient(135deg, #E74C3C, #C0392B); color: white; }
.tool-card-icon.security { background: linear-gradient(135deg, #34495E, #2C3E50); color: white; }
.tool-card-icon.misc { background: linear-gradient(135deg, #1ABC9C, #16A085); color: white; }

.tool-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
    transition: var(--transition);
}

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

.tool-card p {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
}

.tool-card .card-arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--primary);
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-10px);
}

.tool-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   SINGLE TOOL PAGE
   ============================================ */
.tool-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
    width: 100%;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out;
}

.tool-header-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
    animation: bounceIn 0.8s ease-out;
}

.tool-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.tool-header p {
    color: var(--gray);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.tool-workspace {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
    opacity: 0;
    border: 1px solid rgba(0,0,0,0.04);
}

.tool-workspace textarea,
.tool-workspace input[type="text"],
.tool-workspace input[type="number"],
.tool-workspace input[type="url"],
.tool-workspace input[type="file"],
.tool-workspace select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg);
    resize: vertical;
}

.tool-workspace textarea:focus,
.tool-workspace input:focus,
.tool-workspace select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
    background: white;
}

.tool-workspace label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 0.95rem;
}

.tool-workspace textarea {
    min-height: 150px;
}

.tool-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.4s, height 0.4s;
    transform: translate(-50%, -50%);
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #E85579);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 101, 132, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #00B396);
    color: white;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 201, 167, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.output-area {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 2px dashed var(--light-gray);
    min-height: 80px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
    transition: var(--transition);
}

.output-area.has-content {
    border-color: var(--accent);
    background: #F0FFF9;
}

/* ============================================
   TOOL DESCRIPTION / SEO CONTENT
   ============================================ */
.tool-description {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.04);
}

.tool-description h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--dark);
}

.faq-item {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.faq-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.faq-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--gray);
}

.tool-description h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark);
}

.tool-description h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--dark);
}

.tool-description p {
    margin-bottom: 14px;
    color: #444;
    line-height: 1.8;
}

.tool-description ul, .tool-description ol {
    margin: 12px 0 16px 20px;
    color: #444;
}

.tool-description li {
    margin-bottom: 6px;
    line-height: 1.7;
}

/* ============================================
   FILE DROP ZONE
   ============================================ */
.file-drop-zone {
    border: 2px dashed var(--light-gray);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-drop-zone:hover {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.03);
}

.file-drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.08);
    transform: scale(1.01);
}

.file-drop-zone.has-file {
    border-color: var(--success, #2ECC71);
    background: rgba(46, 204, 113, 0.05);
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.drop-zone-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.drop-zone-subtitle {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.drop-zone-formats {
    font-size: 0.8rem;
    color: var(--gray);
    opacity: 0.7;
}

/* File Info */
.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

.file-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.file-size {
    color: var(--gray);
    font-size: 0.85rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray);
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
    margin-left: auto;
}

.btn-icon:hover {
    color: #E74C3C;
    background: rgba(231, 76, 60, 0.1);
}

/* Image Preview */
.image-preview {
    margin-top: 12px;
    text-align: center;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: contain;
}

/* File List (Multiple) */
.file-list {
    margin-top: 12px;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid rgba(0,0,0,0.04);
}

.file-item-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark);
    flex: 1;
}

.file-item-size {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Image Thumbnails (GIF Maker) */
.image-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.image-thumb {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--light-gray);
}

.image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.7rem;
    text-align: center;
    padding: 2px;
}

.thumb-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(231,76,60,0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* ============================================
   TOOL OPTIONS
   ============================================ */
.tool-options {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.tool-options .option-group {
    flex: 1;
    min-width: 150px;
}

.option-group {
    margin-bottom: 12px;
}

.option-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
    margin-bottom: 6px;
}

.option-group input[type="text"],
.option-group input[type="number"],
.option-group input[type="url"],
.option-group input[type="email"],
.option-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    background: white;
}

.option-group input:focus,
.option-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.option-group input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.option-group input[type="color"] {
    width: 48px;
    height: 36px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
}

.option-group input[type="checkbox"] {
    margin-right: 6px;
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-group {
    margin-bottom: 8px;
}

.char-counter {
    font-size: 0.75rem;
    color: var(--gray);
    float: right;
}

.char-counter span {
    font-weight: 600;
}

/* ============================================
   QR TYPE SELECTOR
   ============================================ */
.qr-type-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.qr-type-btn {
    padding: 8px 16px;
    border: 2px solid var(--light-gray);
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--dark);
}

.qr-type-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

/* ============================================
   COLOR PICKER
   ============================================ */
.color-picker-container {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.large-color-picker {
    width: 120px;
    height: 120px;
    border: 3px solid var(--light-gray);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 4px;
}

.color-inputs {
    flex: 1;
    min-width: 200px;
}

/* ============================================
   SEO FORM
   ============================================ */
.seo-form .option-group {
    margin-bottom: 16px;
}

.seo-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: var(--transition);
}

.seo-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

/* ============================================
   CONVERT FORM
   ============================================ */
.convert-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.convert-form .option-group {
    flex: 1;
    min-width: 120px;
}

/* ============================================
   CALC FORM
   ============================================ */
.calc-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.calc-form .option-group {
    flex: 1;
    min-width: 150px;
}

/* ============================================
   PASSWORD OPTIONS
   ============================================ */
.password-options {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 20px;
}

/* ============================================
   VISUAL GENERATOR
   ============================================ */
.visual-preview {
    text-align: center;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   IMAGE RESULT
   ============================================ */
.image-result {
    text-align: center;
}

.image-result h3 {
    color: var(--primary);
    margin-bottom: 8px;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat .stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 4px;
}

.stat .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-green {
    color: #2ECC71 !important;
}

.result-text {
    text-align: left;
    background: var(--bg);
    border-radius: 8px;
    padding: 16px;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}

.processing-info {
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
}

.processing-info p {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ============================================
   SERP PREVIEW
   ============================================ */
.serp-preview {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    max-width: 600px;
    margin: 0 auto;
}

.serp-title {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.serp-url {
    font-size: 14px;
    margin-bottom: 4px;
}

.serp-desc {
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================
   CODE INPUT/OUTPUT
   ============================================ */
.code-input {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9rem;
    tab-size: 2;
}

#code-output {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

/* ============================================
   TEXT INPUT (Single line)
   ============================================ */
.tool-text-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg);
}

.tool-text-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
    background: white;
}

/* ============================================
   SIDEBAR
   ============================================ */
.content-with-sidebar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

.sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
}

.sidebar-widget {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg);
}

.popular-tools-list {
    list-style: none;
}

.popular-tools-list li {
    margin-bottom: 8px;
}

.popular-tools-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
    color: var(--dark);
    font-size: 0.9rem;
}

.popular-tools-list a:hover {
    background: var(--bg);
    color: var(--primary);
    padding-left: 16px;
}

.popular-tools-list .tool-rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 20px 30px;
    margin-top: 60px;
    width: 100%;
    box-sizing: border-box;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    font-size: 0.85rem;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 8px;
    color: var(--light-gray);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

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

    .hero-content p {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .hero-stat .stat-number {
        font-size: 1.5rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border-top: 1px solid var(--light-gray);
        z-index: 999;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px;
    }

    .tool-card {
        padding: 20px;
    }

    .tool-header h1 {
        font-size: 1.7rem;
    }

    .tool-workspace {
        padding: 20px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-section {
        padding: 50px 16px 70px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 12px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tool-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* Tool category filter active states */
.filter-active[data-cat="pdf"] { background: linear-gradient(135deg, #FF6B6B, #EE5A5A); color: white; border-color: transparent; }
.filter-active[data-cat="image"] { background: linear-gradient(135deg, #4ECDC4, #44B3AB); color: white; border-color: transparent; }
.filter-active[data-cat="text"] { background: linear-gradient(135deg, #45B7D1, #3AA5BD); color: white; border-color: transparent; }
.filter-active[data-cat="seo"] { background: linear-gradient(135deg, #6C63FF, #5A52D5); color: white; border-color: transparent; }
.filter-active[data-cat="dev"] { background: linear-gradient(135deg, #2ECC71, #27AE60); color: white; border-color: transparent; }
.filter-active[data-cat="convert"] { background: linear-gradient(135deg, #F39C12, #E67E22); color: white; border-color: transparent; }
.filter-active[data-cat="math"] { background: linear-gradient(135deg, #9B59B6, #8E44AD); color: white; border-color: transparent; }
.filter-active[data-cat="social"] { background: linear-gradient(135deg, #E74C3C, #C0392B); color: white; border-color: transparent; }
.filter-active[data-cat="security"] { background: linear-gradient(135deg, #34495E, #2C3E50); color: white; border-color: transparent; }
.filter-active[data-cat="misc"] { background: linear-gradient(135deg, #1ABC9C, #16A085); color: white; border-color: transparent; }

/* Notification toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--dark);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.visible {
    transform: translateY(0);
    opacity: 1;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.5);
}
