/* ═══════════════════════════════════════════════════════
   BGrade Hub — Professional Tool Selection Page
   ═══════════════════════════════════════════════════════ */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-base: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --radius: 24px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-base: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Outfit', sans-serif; }

/* Background Decoration */
.bg-blob {
    position: fixed;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    z-index: -1;
    filter: blur(60px);
    animation: move-blob 20s infinite alternate;
}
.blob-1 { top: -100px; right: -100px; }
.blob-2 { bottom: -100px; left: -100px; animation-delay: -10s; }

@keyframes move-blob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 100px) scale(1.1); }
}

/* Header */
header {
    padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 4vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
}
.logo span { color: var(--primary); }

/* Main Container */
.hub-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 2rem);
    gap: clamp(1.5rem, 5vw, 3rem);
    max-width: 1100px;
    margin: 0 auto;
}

.hero { text-align: center; max-width: 700px; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 1rem; line-height: 1.1; }
.hero p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; }

/* Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
}

.tool-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 100px; height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(99, 102, 241, 0.1) 100%);
    transition: var(--transition);
}

.icon-wrapper {
    width: 64px; height: 64px;
    background: var(--primary);
    color: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.tool-featured-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.tool-card:hover .tool-featured-img {
    transform: scale(1.02);
}

.tool-info h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.tool-info p { color: var(--text-muted); line-height: 1.5; font-size: 0.95rem; }

.btn-arrow {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-arrow i { transition: var(--transition); }
.tool-card:hover .btn-arrow i { transform: translateX(5px); }

/* Coming Soon Card */
.coming-soon {
    opacity: 0.6;
    cursor: default;
    border-style: dashed;
}
.coming-soon:hover { transform: none; border-color: var(--glass-border); box-shadow: var(--shadow); }
.coming-soon .icon-wrapper { background: var(--text-muted); box-shadow: none; }

/* Theme Toggle */
.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.25rem;
    transition: var(--transition);
}
.icon-btn:hover { background: var(--bg-base); transform: scale(1.05); }

/* Footer */
footer {
    padding: 3rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Stats Row */
.stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-bottom: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 1.5rem) clamp(1.5rem, 5vw, 3rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 99px;
    box-shadow: var(--shadow);
}
.stat-item { text-align: center; }
.stat-val { font-size: 1.75rem; font-weight: 800; color: var(--primary); font-family: 'Outfit', sans-serif; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-divider { width: 1px; height: 30px; background: var(--glass-border); }

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.feature-item {
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius);
    transition: var(--transition);
}
.feature-item:hover { transform: translateY(-5px); border-color: var(--primary); }
.feature-item i { font-size: 2.5rem; color: var(--primary); margin-bottom: 1.25rem; }
.feature-item h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.feature-item p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 768px) {
    .stats-row { flex-direction: column; border-radius: 24px; gap: 1.5rem; }
    .stat-divider { display: none; }
}

/* Hub Sections */
.hub-section {
    width: 100%;
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.section-title { text-align: center; font-size: 2rem; }
.section-title span { color: var(--primary); }

/* Feedback Grid */
.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(1rem, 3vw, 1.5rem);
}

.testimonial-item {
    padding: 1.5rem;
    border-radius: 20px;
}
.testi-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.testi-avatar {
    width: 44px; height: 44px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.testi-stars { color: #fbbf24; font-size: 0.9rem; }
.testimonial-item p { font-size: 0.95rem; line-height: 1.6; color: var(--text-muted); font-style: italic; }

/* Feedback Form */
.feedback-card {
    max-width: 600px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius);
    text-align: center;
}
.feedback-card h3 { font-size: clamp(1.4rem, 4vw, 1.75rem); margin-bottom: 0.5rem; }
.feedback-card h3 span { color: var(--primary); }
.feedback-card p { color: var(--text-muted); margin-bottom: 2rem; }

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hub-input {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}
.hub-input:focus { outline: none; border-color: var(--primary); }

.rating-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-weight: 600;
}
.stars { display: flex; gap: 4px; font-size: 1.5rem; color: #fbbf24; cursor: pointer; }

.btn-hub {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-hub.primary {
    background: var(--primary);
    color: #fff;
}
.btn-hub.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

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

@media (max-width: 640px) {
    .stats-row { border-radius: 24px; flex-direction: column; width: 100%; gap: 1rem; }
    .stat-divider { display: none; }
    .features-grid { grid-template-columns: 1fr; }
}
