/* TechInsight - Premium Magazine Style */
/* Gorgeous Dark Theme with Glass Effects */

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

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #f472b6;
    --accent2: #22d3ee;
    --bg-dark: #0f0f23;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --gradient-1: linear-gradient(135deg, #6366f1, #f472b6);
    --gradient-2: linear-gradient(135deg, #22d3ee, #6366f1);
    --gradient-3: linear-gradient(135deg, #f472b6, #fbbf24);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-dark);
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(244, 114, 182, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(34, 211, 238, 0.05) 0%, transparent 70%);
}

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

/* Header */
header {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 a {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

header nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s;
}

header nav a:hover {
    color: var(--text-primary);
}

header nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(244, 114, 182, 0.15));
    border-bottom: 1px solid var(--glass-border);
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 35px,
        rgba(255, 255, 255, 0.01) 35px,
        rgba(255, 255, 255, 0.01) 70px
    );
    animation: heroShine 20s linear infinite;
}

@keyframes heroShine {
    0% { transform: translate(0, 0); }
    100% { transform: translate(70px, 70px); }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

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

/* Main Content */
main {
    padding: 3rem 0;
    padding-top: 5rem;
}

section {
    margin-bottom: 4rem;
}

section h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

section h3::before {
    content: '';
    width: 4px;
    height: 28px;
    background: var(--gradient-1);
    border-radius: 2px;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

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

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow), var(--shadow-glow);
    border-color: var(--primary-light);
}

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

.article-card .thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s;
}

.article-card:hover .thumb {
    transform: scale(1.05);
}

.article-card .thumb-wrapper {
    overflow: hidden;
    position: relative;
}

.article-card .thumb-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.6) 100%);
}

.article-card .content {
    padding: 1.5rem;
}

.article-card .category {
    display: inline-block;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--primary-light);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.article-card .category.news { color: #22d3ee; border-color: rgba(34, 211, 238, 0.3); }
.article-card .category.reviews { color: #f472b6; border-color: rgba(244, 114, 182, 0.3); }
.article-card .category.tutorials { color: #4ade80; border-color: rgba(74, 222, 128, 0.3); }
.article-card .category.guides { color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); }

.article-card h4 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-weight: 600;
}

.article-card h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.article-card h4 a:hover {
    color: var(--primary-light);
}

.article-card .excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.article-card .meta .author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.article-card .meta .date {
    color: var(--text-muted);
}

.article-card .read-time {
    margin-left: auto;
    color: var(--text-muted);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary);
}

.category-card:hover::before {
    opacity: 0.1;
}

.category-card > * {
    position: relative;
    z-index: 1;
}

.category-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    margin-top: 4rem;
}

footer .container {
    text-align: center;
}

footer p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

footer nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

footer nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

footer nav a:hover {
    color: var(--primary-light);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--primary);
    color: var(--text-primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.pagination .current {
    background: var(--gradient-1);
    color: var(--text-primary);
    border-color: transparent;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Article Page Styles */
.article-content {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-top: 6rem;
}

.article-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.article-header .category {
    display: inline-block;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--primary-light);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-header .meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.article-body {
    line-height: 1.9;
    font-size: 1.08rem;
    color: var(--text-secondary);
}

.article-body h2 {
    font-size: 1.75rem;
    margin: 3rem 0 1.25rem;
    color: var(--text-primary);
}

.article-body h3 {
    font-size: 1.35rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.article-body li {
    margin-bottom: 0.6rem;
}

.article-body a {
    color: var(--primary-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body a:hover {
    color: var(--accent);
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid var(--glass-border);
}

.article-body code {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--accent2);
}

.article-body pre {
    background: #0d0d1a;
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e2e8f0;
}

/* Category Page */
.category-header {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    margin-top: 6rem;
    text-align: center;
}

.category-header h1 {
    font-size: 2.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About & Contact Pages */
.page-content {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-top: 6rem;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-content h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
}

.page-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.page-content ul {
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
}

.page-content li {
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
}

.contact-form {
    margin-top: 2.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn {
    display: inline-block;
    background: var(--gradient-1);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    header nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-content,
    .page-content {
        padding: 1.5rem;
        margin-top: 5rem;
    }

    .article-header h1,
    .page-content h1,
    .category-header h1 {
        font-size: 1.75rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}
