/*
Theme Name: Shreyas Dark Cyber Theme
Theme URI: https://example.com/shreyas-dark-cyber-theme
Author: Shreyas Vispute
Author URI: https://shreyasvispute.in
Description: A dark cyberpunk WordPress blog theme with neon glow, post grid, and modern card based layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: shreyas-dark-cyber
*/

:root {
    --bg: #050914;
    --bg-soft: #0c1426;
    --card: rgba(12, 21, 42, 0.92);
    --line: #1f2f57;
    --text: #d5e5ff;
    --muted: #8fa6c9;
    --accent: #4da3ff;
    --accent-2: #7f8cff;
    --shadow: 0 0 40px rgba(40, 130, 255, 0.14);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, rgba(42, 84, 174, 0.28), transparent 38%),
        radial-gradient(circle at 90% 0%, rgba(52, 92, 192, 0.22), transparent 35%),
        linear-gradient(180deg, #04070f 0%, #070d19 45%, #050914 100%);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("assets/cyber-preview.png") center center / cover no-repeat;
    opacity: 0.11;
    pointer-events: none;
    z-index: -2;
}

a {
    color: #9dc0ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #d7e6ff;
}

.site-shell {
    max-width: 1420px;
    margin: 0 auto;
    padding: 28px 22px 44px;
    position: relative;
    z-index: 1;
}

.site-header {
    background: linear-gradient(180deg, rgba(10, 19, 37, 0.96), rgba(8, 15, 30, 0.9));
    border: 1px solid rgba(56, 94, 170, 0.42);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 18px 24px;
    margin-bottom: 22px;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-title {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    font-weight: 700;
    letter-spacing: 0.2px;
}

.brand-tagline {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: #d7e6ff;
    font-size: 0.94rem;
    opacity: 0.9;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    opacity: 1;
    color: #ffffff;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
}

.content-panel,
.sidebar-panel {
    background: linear-gradient(180deg, rgba(11, 19, 37, 0.96), rgba(8, 15, 29, 0.96));
    border: 1px solid rgba(56, 94, 170, 0.34);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.content-panel {
    padding: 20px;
}

.section-title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #d8e8ff;
}

.post-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.post-card {
    background: var(--card);
    border: 1px solid rgba(79, 117, 197, 0.42);
    border-radius: 12px;
    padding: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(121, 159, 240, 0.8);
    box-shadow: 0 10px 25px rgba(9, 35, 86, 0.35);
}

.post-card .post-meta {
    font-size: 0.75rem;
    color: #8ca3c8;
    margin-bottom: 8px;
}

.post-card h2,
.post-card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    line-height: 1.4;
}

.post-card p {
    margin: 0;
    color: #a8bde0;
    font-size: 0.86rem;
    line-height: 1.5;
}

.featured-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    background: rgba(8, 15, 30, 0.92);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(79, 117, 197, 0.5);
}

.single-post h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

.single-post .entry-meta {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.86rem;
}

.single-post .entry-content {
    color: #c4d5f1;
    line-height: 1.8;
}

.single-post .entry-content pre,
.single-post .entry-content code {
    font-family: "Fira Code", "Consolas", monospace;
}

.single-post .entry-content pre {
    background: #081120;
    border: 1px solid #1f355e;
    border-radius: 10px;
    padding: 14px;
    overflow-x: auto;
}

.wp-block-code,
.wp-block-code code,
pre.wp-block-code,
pre.wp-block-code code {
    color: #cfe0ff;
    background: #081120;
    border: 1px solid #1f355e;
}

.sidebar-panel {
    padding: 18px;
}

.widget + .widget {
    margin-top: 16px;
}

.widget-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #dce9ff;
}

.widget ul {
    margin: 0;
    padding-left: 16px;
}

.widget li {
    margin-bottom: 8px;
    color: #acc1e3;
}

.cyber-feature-box {
    margin-bottom: 18px;
    background: linear-gradient(180deg, rgba(16, 28, 52, 0.96), rgba(10, 18, 34, 0.95));
    border: 1px solid rgba(93, 131, 209, 0.5);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(8, 30, 75, 0.3);
}

.cyber-feature-list {
    margin: 0 0 14px;
    padding-left: 18px;
}

.cyber-feature-list li {
    margin-bottom: 9px;
    color: #d8e5ff;
    font-size: 0.88rem;
}

.cyber-download-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(125, 164, 243, 0.62);
    background: linear-gradient(90deg, rgba(69, 116, 214, 0.85), rgba(85, 114, 240, 0.88));
    color: #f3f8ff;
    font-weight: 600;
}

.cyber-download-btn:hover {
    color: #ffffff;
    filter: brightness(1.08);
}

.site-footer {
    margin-top: 22px;
    border-top: 1px solid rgba(56, 94, 170, 0.28);
    padding-top: 14px;
    color: #7f96ba;
    font-size: 0.82rem;
    text-align: center;
}

.pagination-wrap {
    margin-top: 18px;
}

.pagination-wrap .nav-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-wrap .page-numbers {
    border: 1px solid rgba(87, 124, 204, 0.45);
    background: rgba(17, 29, 52, 0.82);
    color: #dbe7ff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.83rem;
}

.pagination-wrap .page-numbers.current {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: #020711;
    font-weight: 700;
}

@media (max-width: 1080px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .site-shell {
        padding: 16px 12px 28px;
    }

    .layout {
        gap: 16px;
    }

    .content-panel {
        padding: 16px;
    }

    .sidebar-panel {
        padding: 16px;
    }

    .post-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }

    .post-card {
        padding: 12px;
    }

    .featured-thumb {
        aspect-ratio: 4 / 3;
    }

    .cyber-feature-box {
        padding: 12px;
    }

    .cyber-download-btn {
        padding: 10px 10px;
        font-size: 0.95rem;
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-navigation ul {
        flex-wrap: wrap;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .site-shell {
        padding: 14px 10px 24px;
    }

    .layout {
        gap: 14px;
    }

    .post-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

    .post-card h2,
    .post-card h3 {
        font-size: 0.98rem;
    }

    .brand-tagline {
        font-size: 0.9rem;
    }

    .featured-thumb {
        aspect-ratio: 16 / 10;
    }
}
.has-black-color {
    /* Gutenberg often applies this to code/text; make it readable on dark background. */
    color: #cfe0ff !important;
}

/* Make all code blocks readable even if Gutenberg applies inline color classes. */
.entry-content pre,
.entry-content code {
    color: #cfe0ff !important;
}

.entry-content pre {
    background: #081120 !important;
    border: 1px solid #1f355e !important;
    border-radius: 10px !important;
    padding: 14px !important;
    overflow-x: auto !important;
}

.entry-content pre code {
    background: transparent !important;
}

/* Gutenberg/editor content: keep everything inside viewport */
.entry-content img,
.entry-content svg,
.entry-content video,
.entry-content canvas,
.entry-content iframe {
    max-width: 100%;
    height: auto;
}

.entry-content table {
    width: 100%;
    display: block;
    overflow-x: auto;
}

/* Prevent long code/text from forcing horizontal scrolling on mobile */
.entry-content pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.entry-content {
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .site-header {
        padding: 14px 14px;
    }

    .content-panel {
        padding: 14px;
    }

    .sidebar-panel {
        padding: 14px;
    }

    .post-card h2,
    .post-card h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .layout {
        gap: 12px;
    }
}

/* Contact form (cyber styling for common WP form plugins + generic forms) */
.site-shell form {
    margin: 0;
}

.site-shell form label {
    display: block;
    margin: 0 0 6px;
    color: #a8bde0;
    font-size: 0.9rem;
    font-weight: 600;
}

.site-shell form input[type="text"],
.site-shell form input[type="email"],
.site-shell form input[type="url"],
.site-shell form input[type="tel"],
.site-shell form input[type="number"],
.site-shell form input[type="search"],
.site-shell form input[type="password"],
.site-shell form textarea,
.site-shell form select {
    width: 100%;
    background: rgba(8, 15, 30, 0.92);
    border: 1px solid rgba(93, 131, 209, 0.52);
    border-radius: 10px;
    color: var(--text);
    padding: 10px 12px;
    margin-bottom: 12px;
    box-shadow: inset 0 0 0 1px rgba(9, 35, 86, 0.35);
}

.site-shell form textarea {
    min-height: 140px;
    resize: vertical;
}

.site-shell form input:focus,
.site-shell form textarea:focus,
.site-shell form select:focus {
    outline: none;
    border-color: rgba(125, 164, 243, 0.95);
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.22);
}

.site-shell form input[type="submit"],
.site-shell form button[type="submit"],
.wpcf7 input[type="submit"].wpcf7-submit,
.wpcf7 button.wpcf7-submit,
.wpforms-submit {
    display: inline-block;
    width: auto;
    padding: 11px 16px;
    border-radius: 10px;
    border: 1px solid rgba(125, 164, 243, 0.62);
    background: linear-gradient(90deg, rgba(69, 116, 214, 0.88), rgba(85, 114, 240, 0.92));
    color: #f3f8ff;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.site-shell form input[type="submit"]:hover,
.site-shell form button[type="submit"]:hover,
.wpcf7 input[type="submit"].wpcf7-submit:hover,
.wpcf7 button.wpcf7-submit:hover,
.wpforms-submit:hover {
    filter: brightness(1.08);
}

.site-shell form .wpcf7-not-valid-tip,
.site-shell form .wpcf7-response-output {
    color: #d7e6ff;
}

.site-shell form .wpcf7-not-valid-tip {
    font-size: 0.85rem;
}