/* Main CSS - Modern App Overhaul */

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a12;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-primary-cyan);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 20px;
}

.loading-text {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}


:root {
    --color-bg: #0a0a12;
    --color-surface: rgba(255, 255, 255, 0.05);
    --color-surface-hover: rgba(255, 255, 255, 0.1);
    --color-text: #ffffff;
    --color-text-muted: #a0a0a0;
    --color-primary-pink: #ED1C7B;
    --color-primary-cyan: #42CED3;
    --color-primary-purple: #65449C;
    --color-primary-blue: #2972C2;
    --color-accent-orange: #F7913C;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary-cyan);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--color-primary-pink);
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Canvas for Stars */
#stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - App Bar Style */
.site-header {
    padding: 15px 0;
    background: rgba(10, 10, 18, 0.85);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title a {
    color: var(--color-text);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #ccc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-navigation ul {
    display: flex;
    gap: 25px;
}

.site-navigation a {
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.site-navigation a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero-section {
    padding: 120px 0 80px;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--color-primary-pink), var(--color-primary-cyan));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: linear-gradient(90deg, var(--color-primary-purple), var(--color-primary-blue));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(41, 114, 194, 0.3);
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(41, 114, 194, 0.5);
    color: white;
}

/* Post Grid */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.post-card {
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    background: var(--color-surface-hover);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-md);
}

.post-thumbnail {
    height: 200px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.entry-title {
    font-size: 1.25rem;
    margin: 0 0 10px;
    line-height: 1.4;
    font-weight: 700;
}

.entry-title a {
    color: var(--color-text);
}

.entry-title a:hover {
    color: var(--color-primary-cyan);
}

.entry-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary-cyan);
    display: inline-flex;
    align-items: center;
}

.read-more::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.2s;
}

.read-more:hover::after {
    transform: translateX(3px);
}

/* Single Post */
.post-hero {
    height: 50vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    margin-bottom: 60px;
}

.post-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--color-bg) 100%);
}

.post-hero .container {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-bottom: 40px;
}

.single-post .entry-title {
    font-size: 3rem;
    margin-bottom: 15px;
    line-height: 1.1;
}

.entry-meta {
    color: var(--color-text-muted);
    font-size: 1rem;
    display: flex;
    gap: 15px;
    align-items: center;
}

.content-container {
    max-width: 760px;
}

.entry-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e0e0e0;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2 {
    font-size: 2rem;
    margin-top: 2em;
    margin-bottom: 0.75em;
    color: #fff;
}

/* Comments Area - Modern App Style */
.comments-area {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.comment-list {
    margin-bottom: 40px;
}

.comment-body {
    background: var(--color-surface);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.comment-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid var(--color-primary-purple);
}

.comment-author cite {
    font-style: normal;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}

.comment-metadata {
    margin-left: auto;
    font-size: 0.85rem;
}

.comment-metadata a {
    color: var(--color-text-muted);
}

.comment-content p {
    margin: 0;
    font-size: 1rem;
    color: #ddd;
}

.reply {
    margin-top: 10px;
    text-align: right;
}

.comment-reply-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary-cyan);
}

/* Comment Form */
.comment-respond {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-reply-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    display: block;
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 12px 15px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary-cyan);
    background: rgba(0, 0, 0, 0.5);
}

.submit-btn {
    background: linear-gradient(90deg, var(--color-primary-pink), var(--color-primary-purple));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.submit-btn:hover {
    opacity: 0.9;
}

/* Footer */
.site-footer {
    padding: 40px 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

/* 404 */
.error-404-container {
    text-align: center;
    padding: 100px 0;
}

.search-form-container {
    max-width: 400px;
    margin: 30px auto;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-field {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 10px 20px;
    color: #fff;
}

.search-submit {
    background: var(--color-primary-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .single-post .entry-title {
        font-size: 2rem;
    }

    .site-header .container {
        flex-direction: column;
        gap: 15px;
    }

    .site-navigation ul {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
}