:root {
    /* Modern Palette */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --background: #ffffff;
    --surface: #f3f4f6;
    --surface-card: #ffffff;
    --text: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
    --error: #ef4444;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    /* Spacing & Radius */
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --container: 1200px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --background: #0f172a;
    --surface: #1e293b;
    --surface-card: #1e293b;
    --text: #f9fafb;
    --text-secondary: #9ca3af;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Layout */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
[data-theme="dark"] .navbar { background: rgba(15, 23, 42, 0.8); }

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-link { color: var(--text-secondary); text-decoration: none; font-weight: 500; transition: var(--transition); }
.nav-link:hover { color: var(--primary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-secondary); }

/* Hero */
.hero {
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Tool Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.tool-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

.tool-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tool-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.tool-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* Upload Area */
.upload-area {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
    opacity: 0.8;
}

/* Footer */
footer {
    background: var(--surface);
    padding: 4rem 0;
    margin-top: 6rem;
    border-top: 1px solid var(--border);
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}
.theme-toggle:hover { background: var(--surface); }

/* Admin Dashboard */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: var(--surface-card); border-right: 1px solid var(--border); padding: 1.5rem; }
.sidebar-link { display: block; padding: 0.75rem 1rem; color: var(--text-secondary); text-decoration: none; border-radius: var(--radius); margin-bottom: 0.5rem; }
.sidebar-link:hover, .sidebar-link.active { background: var(--primary); color: white; }
.main-content { flex: 1; padding: 2rem; background: var(--surface); }

/* Form Elements */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="color"], textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--text);
    margin-bottom: 1rem;
    font-family: inherit;
    transition: var(--transition);
}
input:focus { outline: 2px solid var(--primary); border-color: transparent; }

input[type="range"] {
    width: 100%;
    cursor: pointer;
    margin: 1rem 0;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-control {
    /* Helper class if needed, but input selectors cover most */
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; } /* Simplified for now */
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; }
}

