@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(15, 15, 25, 0.8);
    --bg-card-hover: rgba(25, 25, 40, 0.9);
    --text-primary: #e8e6f0;
    --text-secondary: #8b87a0;
    --neon-pink: #ff2d7a;
    --neon-cyan: #00f5ff;
    --neon-purple: #b14dff;
    --glow-pink: rgba(255, 45, 122, 0.4);
    --glow-cyan: rgba(0, 245, 255, 0.4);
}

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

/* Animated background */
body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.7;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(177, 77, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 45, 122, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 245, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: aurora 20s ease-in-out infinite alternate;
}

@keyframes aurora {
    0% { opacity: 1; transform: scale(1) rotate(0deg); }
    100% { opacity: 0.7; transform: scale(1.1) rotate(3deg); }
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--neon-pink), var(--neon-purple));
    border-radius: 4px;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav .logo a {
    font-size: 2.4rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink), var(--neon-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
    text-shadow: 0 0 30px var(--glow-cyan);
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

nav .nav-links {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

nav .nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
}

nav .nav-links a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--glow-cyan);
}

/* Headings */
h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
    border-radius: 2px;
    box-shadow: 0 0 10px var(--glow-pink);
}

h2 {
    font-size: 1.4rem;
    font-weight: 600;
}

h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

h2 a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
    transition: width 0.3s ease;
}

h2 a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 20px var(--glow-cyan);
}

h2 a:hover::before {
    width: 100%;
}

/* Articles */
article {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.8rem 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple), var(--neon-cyan));
    opacity: 0;
    transition: opacity 0.3s ease;
}

article:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    border-color: rgba(255, 45, 122, 0.2);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 45, 122, 0.1);
}

article:hover::before {
    opacity: 1;
}

article header {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

article small {
    color: var(--neon-pink);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

article small span {
    display: inline-flex;
    align-items: center;
}

article small i {
    margin-right: 0.4rem;
}

article p {
    color: var(--text-secondary);
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.back-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--glow-cyan);
    transform: translateX(-5px);
}

/* Forms */
form {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

label {
    display: block;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    margin-top: 0.6rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
}

textarea {
    resize: vertical;
    min-height: 220px;
    font-family: 'JetBrains Mono', monospace;
}

/* Buttons */
button,
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::before,
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--glow-pink);
}

button:hover::before,
.btn:hover::before {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 10px 30px var(--glow-cyan);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

th, td {
    padding: 1.2rem 1rem;
    text-align: left;
}

th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--neon-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

tr:last-child {
    border-bottom: none;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

td a {
    color: var(--neon-pink);
    text-decoration: none;
    transition: all 0.3s ease;
}

td a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--glow-cyan);
}

/* Messages */
.error {
    color: #ff4757;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ff4757;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.success {
    color: #2ed573;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(46, 213, 115, 0.1);
    border-radius: 8px;
    border-left: 3px solid #2ed573;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pagination-link {
    color: var(--neon-pink);
    text-decoration: none;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 15px var(--glow-cyan);
}

.pagination-info {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

/* Post content (markdown) */
.post-content {
    color: var(--text-secondary);
    line-height: 1.9;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1.2rem;
}

.post-content a {
    color: var(--neon-cyan);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.post-content a:hover {
    border-bottom-color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--glow-cyan);
}

.post-content ul,
.post-content ol {
    margin: 1.2rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.6rem;
}

.post-content blockquote {
    border-left: 3px solid var(--neon-purple);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(177, 77, 255, 0.1);
    border-radius: 0 10px 10px 0;
    font-style: italic;
}

.post-content code {
    background: rgba(0, 245, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--neon-cyan);
}

.post-content pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.post-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-purple), transparent);
    margin: 2.5rem 0;
}

/* Nav icons */
.nav-links i {
    font-size: 1.15rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.copyleft {
    display: inline-block;
    transform: scaleX(-1);
}

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