@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700&display=swap');

:root {
    --bg-color: #000000;
    --card-bg: #0a0a0a; /* Slightly lighter than bg */
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-color: #bb86fc;
    --link-hover: #9965f4;
    --border-color: #333;
    --code-bg: #000000;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.8;
    font-size: 1.1rem;
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
header {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    border-bottom: none;
}

.site-title:hover {
    color: var(--text-primary);
    border-bottom: none;
}

nav a {
    margin-right: 20px;
    margin-left: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: none;
}

nav a:hover {
    color: var(--accent-color);
}

/* Typography & Content */
h1, h2, h3, h4 {
    color: var(--text-primary);
    line-height: 1.5;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.2rem;
    margin-top: 0;
}

p {
    margin-bottom: 1.5rem;
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
    padding-left: 0;
}

li {
    margin-bottom: 0.5rem;
}

blockquote {
    border-right: 3px solid var(--accent-color);
    border-left: none;
    margin: 2rem 0;
    padding-right: 1.5rem;
    padding-left: 0;
    font-style: italic;
    color: var(--text-secondary);
}

code, pre {
    direction: ltr;
    text-align: left;
    font-family: "Fira Code", Consolas, Monaco, monospace;
}

code {
    background-color: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    background-color: var(--code-bg);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 2rem;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* Post List - Modern Card Style */
.post-item {
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 3rem;
    transition: transform 0.2s ease;
}

.post-item:hover {
    transform: translateY(-5px);
}

.post-thumbnail {
    width: 100%;
    height: 240px;
    border-bottom: none;
    display: block;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: opacity 0.3s;
}

.post-thumbnail:hover img {
    opacity: 0.9;
}

.post-details {
    padding: 25px;
}

.post-title {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    display: block;
    border-bottom: none;
}

.post-title h2 {
    margin-top: 0;
    margin-bottom: 0;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    gap: 15px;
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 1rem;
}

.post-excerpt p {
    margin-bottom: 0;
}

/* Single Post Card Style */
.single-post-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2rem;
}

.single-post-card .featured-image {
    margin: 0; /* Reset margin */
    width: 100%;
    height: 400px;
}

.single-post-card .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0; /* Image itself doesn't need radius */
}

.single-post-card .card-content {
    padding: 40px;
}

.single-post-card .post-meta {
    margin-bottom: 2.5rem;
}

/* Tags */
.tag {
    color: var(--accent-color);
    font-size: 0.85rem;
    border-bottom: none;
}

.tag::before {
    content: "#";
    opacity: 0.6;
    margin-left: 2px;
}

/* Post Footer (Share & Link) */
.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.share-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
}

.share-buttons a {
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: none;
}

.share-buttons a:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.link-section {
    flex-grow: 1;
    min-width: 250px;
}

.link-section label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.link-section input[type="text"] {
    width: 100%;
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9rem;
    direction: ltr;
    text-align: left;
    cursor: pointer;
}

.link-section small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

/* Footer */
footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}
