/* Q Tool - Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary: #06b6d4;
    --bg-dark: #0a0a0f;
    --bg-card: rgba(255,255,255,0.03);
    --bg-card-hover: rgba(255,255,255,0.06);
    --bg-input: rgba(0,0,0,0.3);
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.6);
    --text-dim: rgba(255,255,255,0.4);
    --border: rgba(255,255,255,0.08);
    --border-light: rgba(255,255,255,0.12);
    --glow: rgba(16, 185, 129, 0.4);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(6, 182, 212, 0.08), transparent);
    z-index: -1;
    pointer-events: none;
}

.grid-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 12px 24px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.logo-icon {
    font-size: 1.5rem;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    margin: 0 20px;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-card); }
.nav-links a.active { color: var(--primary); background: rgba(16, 185, 129, 0.1); }
.nav-btn {
    background: var(--primary) !important;
    color: #000 !important;
}
.nav-btn:hover { background: var(--primary-light) !important; }

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}
.mobile-menu:hover { background: var(--bg-card); }
.mobile-menu span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}
.mobile-nav {
    display: none;
    position: fixed;
    top: 65px; left: 0; right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    padding: 16px;
    z-index: 99;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    max-height: calc(100vh - 65px);
    overflow-y: auto;
}
.mobile-nav.active { display: flex; }
.mobile-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 0.95rem;
}
.mobile-nav a:hover, .mobile-nav a.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
}
.mobile-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .mobile-menu { display: flex; }
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 90px 24px 40px;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 40px 0 50px;
}
.page-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    display: inline-block;
}
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    transition: all 0.3s;
}
.card:hover {
    border-color: var(--border-light);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-title .icon { font-size: 1.3rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
    box-shadow: 0 4px 20px var(--glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--glow);
}
.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}
.btn-success { background: var(--success); color: #000; }
.btn-error { background: var(--error); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Form Elements */
input, textarea, select {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
input::placeholder, textarea::placeholder {
    color: var(--text-dim);
}
label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}
.form-group { margin-bottom: 20px; }

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1000px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Badges & Tags */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--info); }

/* Status Messages */
.status {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-top: 16px;
}
.status-success { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.status-error { background: rgba(239, 68, 68, 0.1); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.2); }
.status-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.status-info { background: rgba(59, 130, 246, 0.1); color: var(--info); border: 1px solid rgba(59, 130, 246, 0.2); }

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    background: rgba(0,0,0,0.2);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
tr:hover { background: var(--bg-card); }
tr:last-child td { border-bottom: none; }

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-lg { width: 40px; height: 40px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toggle Switch */
.toggle {
    position: relative;
    width: 48px;
    height: 26px;
    display: inline-block;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 26px;
    transition: 0.3s;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: var(--text);
    border-radius: 50%;
    transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary); }
.toggle input:checked + .toggle-slider:before { transform: translateX(22px); background: #000; }

/* Footer */
.footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
}
.footer p { color: var(--text-muted); font-size: 0.9rem; }
.footer a { color: var(--primary); text-decoration: none; }
.footer-note { font-size: 0.8rem !important; opacity: 0.6; margin-top: 8px; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }


/* Tool Price Badge */
.tool-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,193,7,0.15);
    border: 1px solid rgba(255,193,7,0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #ffc107;
    margin-left: 8px;
    font-weight: 500;
}
