/* CSS Variables for Theme */
:root {
    --theme-color: #00ff88;
    --theme-rgb: 0, 255, 136;
}

/* Apply theme colors */
.text-green-400,
.text-green-500,
.text-green-600,
#progress-bar {
    color: var(--theme-color) !important;
}

#progress-bar {
    background-color: var(--theme-color) !important;
}

.border-green-900\/20 {
    border-color: rgba(var(--theme-rgb), 0.2) !important;
}

#post-content,
#post-content h1,
#post-content h2,
#post-content h3,
#post-content h4,
#post-content h5,
#post-content h6,
#post-content p,
#post-content a,
#post-content ul,
#post-content ol,
#post-content li,
#post-content code,
#post-content blockquote,
.tag,
.resource-title {
    color: var(--theme-color) !important;
}

#post-content blockquote {
    border-left-color: rgba(var(--theme-rgb), 0.3) !important;
    border-color: rgba(var(--theme-rgb), 0.15) !important;
}

.tag:hover {
    background: rgba(var(--theme-rgb), 0.05) !important;
}

/* Minimal Terminal Theme */
body {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
}

/* Typography */
#post-content {
    color: #00ff88;
    line-height: 1.7;
    opacity: 0.85;
}

#post-content h1,
#post-content h2,
#post-content h3,
#post-content h4,
#post-content h5,
#post-content h6 {
    color: #00ff88;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 0;
    opacity: 0.9;
}

/* Remove the > symbol from headings */
#post-content h1:first-child {
    display: none;
    /* Hide first h1 if it exists in content */
}

#post-content h1 {
    font-size: 1.5rem;
}

#post-content h2 {
    font-size: 1.25rem;
}

#post-content h3 {
    font-size: 1.125rem;
}

#post-content h4 {
    font-size: 1rem;
}

@media (min-width: 768px) {
    #post-content h1 {
        font-size: 1.75rem;
    }

    #post-content h2 {
        font-size: 1.5rem;
    }

    #post-content h3 {
        font-size: 1.25rem;
    }

    #post-content h4 {
        font-size: 1.125rem;
    }
}

#post-content p {
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    opacity: 1;
}

#post-content a {
    color: #00ff88;
    text-decoration: none;
    border-bottom: 1px dotted #00ff88;
    transition: all 0.2s;
    opacity: 0.9;
}

#post-content a:hover {
    border-bottom-style: solid;
    opacity: 1;
}

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

#post-content li {
    margin-bottom: 0.5rem;
    opacity: 1;
}

#post-content li::marker {
    color: #00ff88;
    opacity: 0.5;
}

#post-content blockquote {
    background: rgba(0, 20, 15, 0.2);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-left: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 6px;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    opacity: 0.8;
    font-style: italic;
}

#post-content code {
    background: rgba(0, 255, 136, 0.08);
    color: #00ff88;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: inherit;
    opacity: 0.9;
}

#post-content pre {
    background: #0d0d0d;
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 0.375rem;
    padding: 2.5rem 1rem 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
}

/* Code block language label */
#post-content pre::before {
    content: attr(data-language);
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 0.625rem;
    color: #00ff88;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#post-content pre[data-language=""]::before {
    content: 'code';
}

#post-content pre code {
    background: none;
    padding: 0;
    color: #00ff88;
    font-size: 0.875rem;
}

/* Copy button */
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
}

pre:hover .copy-btn {
    opacity: 0.7;
}

.copy-btn:hover {
    opacity: 1 !important;
    border-color: #00ff88;
}

.copy-btn.copied {
    background: #00ff88;
    color: #0a0a0a;
}

/* Resource Links Styling */
.resource-link {
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0;
}

.resource-link:hover {
    transform: translateX(4px);
}

.resource-link:hover .resource-title {
    opacity: 1;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.3);
}

.resource-title {
    color: #00ff88;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    transition: all 0.2s;
}

.resource-url {
    color: #00ff88;
    font-size: 0.75rem;
    opacity: 0.5;
    word-break: break-all;
}

/* Resource Link Tooltip - updated to match dark UI */
.resource-tooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: rgba(10, 10, 10, 0.95);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    max-width: 300px;
    line-height: 1.4;
    box-shadow: 0 0 4px rgba(0, 255, 136, 0.1);
    backdrop-filter: blur(2px);
    animation: tooltipFadeIn 0.15s ease-out;
    transform-origin: top left;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Action Buttons - Minimal */
.action-btn {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    color: #00ff88;
    opacity: 0.6;
    transition: all 0.2s;
    cursor: pointer;
}

.action-btn:hover {
    background: rgba(0, 255, 136, 0.05);
    opacity: 1;
}

.action-btn.copied {
    opacity: 1;
}

.action-btn:disabled,
.like-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Like Button - Minimal */
.like-btn {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    color: #00ff88;
    opacity: 0.6;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.like-btn:hover {
    opacity: 1;
    background: rgba(0, 255, 136, 0.05);
}

.like-btn .heart-icon {
    transition: all 0.2s;
}

.like-btn.liked {
    opacity: 1;
}

.like-btn.liked .heart-icon {
    fill: currentColor;
}

/* Dark Mode */
body.darker-mode {
    background: #000000;
}

body.darker-mode #post-content {
    opacity: 0.95;
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    nav,
    #progress-bar,
    .share-btn,
    footer {
        display: none !important;
    }

    #post-content,
    #post-content h1,
    #post-content h2,
    #post-content h3,
    #post-content p,
    #post-content a,
    #post-content li,
    #post-content code {
        color: black !important;
        opacity: 1 !important;
    }

    #post-content pre {
        background: #f5f5f5 !important;
        border: 1px solid #ddd !important;
    }

    #post-content pre code {
        color: #333 !important;
    }

    #post-title {
        color: black !important;
    }

    .copy-btn {
        display: none !important;
    }

    #post-content a {
        text-decoration: underline !important;
        border: none !important;
    }

    #post-content a::after {
        content: " (" attr(href) ")" !important;
        font-size: 0.8em !important;
        color: #666 !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.2s ease-out;
}

#post-content hr {
    border: none;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    margin: 2rem 0;
}

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

#post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

#post-content th,
#post-content td {
    border: 1px solid rgba(0, 255, 136, 0.2);
    padding: 0.5rem;
    text-align: left;
}

#post-content th {
    background: rgba(0, 255, 136, 0.05);
}

/* Tags section removed */

/* Override Prism styles for minimal look */
code[class*="language-"],
pre[class*="language-"] {
    color: #00ff88 !important;
    background: #0d0d0d !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace !important;
}

.token.comment {
    color: #608b4e !important;
}

.token.keyword {
    color: #569cd6 !important;
}

.token.string {
    color: #ce9178 !important;
}

.token.number {
    color: #b5cea8 !important;
}

.token.function {
    color: #dcdcaa !important;
}

.token.operator {
    color: #d4d4d4 !important;
}

.token.punctuation {
    color: #d4d4d4 !important;
}

