:root {
  --bg-white: #FFFFFF;
  --bg-off: #FAFBFF;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --accent-blue: #2563EB;
  --accent-blue-hover: #1E40AF;
  --accent-emerald: #10B981;
  --bg-light-blue: #EFF6FF;
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background-color: var(--bg-white); color: var(--text-primary); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { color: var(--text-primary); font-weight: 700; line-height: 1.1; font-family: 'Outfit', sans-serif; }
h1 { font-size: clamp(2.5rem, 8vw, 4rem); margin-bottom: 2rem; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); margin-bottom: 1.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { color: var(--text-secondary); margin-bottom: 1.25rem; font-size: 1.1rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
@media (max-width: 768px) { .container { padding: 0 1.5rem; } }

.site-header { border-bottom: 1px solid var(--border-color); padding: 1rem 0; background: var(--bg-white); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--accent-blue); display: flex; align-items: center; gap: 0.5rem; }

/* Global Search */
.search-container { position: relative; width: 100%; max-width: 400px; }
.search-input { width: 100%; padding: 0.75rem 1rem 0.75rem 2.5rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); font-size: 1rem; transition: all var(--transition-fast); background: #f9fafb; }
.search-input:focus { outline: none; border-color: var(--accent-blue); background: var(--bg-white); box-shadow: 0 0 0 3px var(--bg-light-blue); }
.search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-secondary); }
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); margin-top: 0.5rem; max-height: 300px; overflow-y: auto; z-index: 200; display: none; }
.search-dropdown.active { display: block; }
.search-item { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); display: block; transition: background var(--transition-fast); }
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg-light-blue); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.875rem 2rem; border-radius: var(--radius-full); font-weight: 600; cursor: pointer; transition: all var(--transition-smooth); border: none; font-family: 'Inter', sans-serif; gap: 0.5rem; }
.btn-primary { background: linear-gradient(135deg, var(--accent-blue) 0%, #1D4ED8 100%); color: var(--bg-white); box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4); filter: brightness(1.1); }
.btn-secondary { background: var(--bg-white); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-light-blue); border-color: var(--accent-blue); }
.btn-scale:active { transform: scale(0.96); }

/* Animations */
.fade-in { animation: fadeIn var(--transition-smooth); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }

.reveal-on-scroll { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal-active { opacity: 1; transform: translateY(0); }
.stagger-1 { animation-delay: 0.1s; animation-fill-mode: both; }
.stagger-2 { animation-delay: 0.2s; animation-fill-mode: both; }
.stagger-3 { animation-delay: 0.3s; animation-fill-mode: both; }

/* Grids */
.grid { display: grid; gap: 1.5rem; }
.grid-1 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Cards */
.card { background: var(--bg-white); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.5rem; transition: all var(--transition-smooth); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-blue); }
.card-icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--bg-light-blue); color: var(--accent-blue); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1rem; }
.card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-primary); }
.card-desc { color: var(--text-secondary); font-size: 0.875rem; flex-grow: 1; }
.card-meta { margin-top: 1rem; font-size: 0.875rem; color: var(--text-secondary); font-weight: 500; }

/* Hero */
.hero { padding: 1rem 0 1rem; text-align: center; position: relative; overflow: hidden; background: radial-gradient(circle at top, #EFF6FF 0%, #FFFFFF 100%); }
.hero::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100%; height: 100%; 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='%232563eb' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2v-4h4v-2H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); opacity: 0.5; pointer-events: none; }
.hero-badge { display: inline-flex; align-items: center; background: var(--bg-light-blue); color: var(--accent-blue); padding: 0.5rem 1rem; border-radius: var(--radius-full); font-size: 0.875rem; font-weight: 600; margin-bottom: 2rem; border: 1px solid rgba(37, 99, 235, 0.1); }
.hero h1 span { background: linear-gradient(135deg, #2563EB 0%, #10B981 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.25rem; max-width: 700px; margin: 0 auto 3rem; line-height: 1.6; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; align-items: center; }
.hero-stats { margin-top: 4rem; display: flex; gap: 3rem; justify-content: center; border-top: 1px solid var(--border-color); padding-top: 2rem; }
.stat-item { text-align: center; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.stat-label { font-size: 0.875rem; color: var(--text-secondary); }

/* Tool Page Specifics */
.tool-page-layout { display: grid; gap: 3rem; padding: 2rem 1rem; width: 100%; overflow-x: hidden; }
@media (min-width: 1024px) { 
    .tool-page-layout { grid-template-columns: 1fr 1fr; align-items: start; } 
}
.tool-ui { position: relative; z-index: 10; width: 100%; }
@media (min-width: 1024px) { .tool-ui { position: sticky; top: 100px; } }

.upload-box { border: 2px dashed var(--border-color); border-radius: var(--radius-lg); padding: 3rem 2rem; text-align: center; transition: all var(--transition-fast); background: #f9fafb; cursor: pointer; position: relative; }
.upload-box:hover, .upload-box.dragover { border-color: var(--accent-blue); background: var(--bg-light-blue); box-shadow: 0 0 15px rgba(37, 99, 235, 0.1); }
.upload-icon { font-size: 3rem; color: var(--accent-blue); margin-bottom: 1rem; }

.progress-container { display: none; width: 100%; height: 8px; background: var(--border-color); border-radius: 4px; margin-top: 1.5rem; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent-blue); width: 0%; transition: width 0.3s ease; }

.seo-content { line-height: 1.8; }
.seo-content h2, .seo-content h3 { margin-top: 2rem; margin-bottom: 1rem; }
.seo-content ul, .seo-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; color: var(--text-secondary); }
.seo-content li { margin-bottom: 0.5rem; }

.breadcrumbs { margin-top: 2rem; padding: 0 1rem; font-size: 0.875rem; color: var(--text-secondary); }
.breadcrumbs a { color: var(--accent-blue); transition: color var(--transition-fast); }
.breadcrumbs a:hover { color: var(--accent-blue-hover); text-decoration: underline; }
.breadcrumbs span { margin: 0 0.5rem; color: var(--text-secondary); }

.section { padding: 1rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }

.footer { background: #f9fafb; border-top: 1px solid var(--border-color); padding: 3rem 0; margin-top: 4rem; text-align: center; color: var(--text-secondary); }
