/* ========================================
   Utilab - Premium Design System
   ======================================== */

:root {
    --primary: #7c3aed;
    --primary-light: #8b5cf6;
    --primary-dark: #6d28d9;
    --primary-glow: rgba(124, 58, 237, 0.25);
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --bg: #ffffff;
    --bg-secondary: #f8f7fc;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 10px 15px -3px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 20px 48px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 50px rgba(124,58,237,0.12), 0 8px 20px rgba(0,0,0,0.06);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Header - Premium
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229,231,235,0.5);
    transition: all 0.3s;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    background: var(--primary-glow);
    border-radius: 12px;
    filter: blur(8px);
    opacity: 0.6;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.logo-icon svg {
    position: relative;
    z-index: 1;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
    border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-search {
    background: var(--bg-secondary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-search:hover {
    background: var(--border);
    color: var(--text);
}

.btn-primary-sm {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.btn-primary-sm:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* ========================================
   Hero - Premium
   ======================================== */

.hero {
    position: relative;
    padding: 140px 0 80px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8f7fc 0%, #ffffff 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #7c3aed, transparent);
    top: -200px;
    right: -200px;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #a78bfa, transparent);
    bottom: -100px;
    left: -100px;
    animation: orbFloat 10s ease-in-out infinite reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #c4b5fd, transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat 12s ease-in-out infinite 2s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.15);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-badge span {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #7c3aed 60%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-search {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.hero-search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font);
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ========================================
   Section Headers
   ======================================== */

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

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

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

.section-header .count-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 12px;
}

/* ========================================
   Tools Section
   ======================================== */

.tools-section {
    padding: 80px 0 60px;
}

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

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #a78bfa);
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124,58,237,0.2);
    box-shadow: var(--shadow-lg);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.tool-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tool-meta {
    flex: 1;
    min-width: 0;
}

.tool-meta h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.tool-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-free,
.tag-premium {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-free {
    background: #d1fae5;
    color: #059669;
}

.tag-premium {
    background: #fef3c7;
    color: #d97706;
}

.tag-category {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-bookmark {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-bookmark:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.tool-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.tool-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.tool-stats {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tool-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-review {
    padding: 8px 14px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

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

.btn-try {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    font-family: var(--font);
}

.btn-try:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* ========================================
   Reviews Section (Homepage)
   ======================================== */

.reviews-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-secondary) 100%);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 0;
}

.review-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid var(--border);
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(124,58,237,0.2);
}

.review-card-img {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    position: relative;
    overflow: hidden;
}

.review-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.1));
}

.review-card-body {
    padding: 20px;
}

.review-card-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.review-card-body .rating-stars {
    margin-bottom: 8px;
    display: flex;
    gap: 2px;
}

.review-card-body .rating-stars .star {
    color: #f59e0b;
    font-size: 0.85rem;
}

.review-card-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.review-read {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    transition: gap 0.2s;
}

.review-card:hover .review-read::after {
    content: ' →';
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: #1a1a2e;
    padding: 60px 0 40px;
    color: white;
}

.footer-inner {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand .logo-text {
    font-size: 1.3rem;
    background: linear-gradient(135deg, #c4b5fd, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-desc {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-copy {
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    .nav {
        display: none;
    }
    .header-actions .btn-primary-sm {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .hero {
        padding: 100px 0 60px;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
}

/* Feedback Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.modal-header h3 { font-size: 1.2rem; font-weight: 700; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal-close:hover { background: #f3f4f6; color: #1a1a2e; }
