/* Oranges Blog - Susurrus-inspired Warm Sunset Theme */

:root {
    --sunset-amber: #f59e0b;
    --sunset-honey: #d97706;
    --sunset-gold: #b45309;
    --sunset-rose: #fda4af;
    --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    --glass-bg: rgba(255, 247, 237, 0.25);
    --glass-border: rgba(255, 220, 180, 0.5);
    --glass-shadow: rgba(120, 53, 15, 0.1);
}

/* Warm Cream Gradient Background */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 25%, #fed7aa 50%, #ffedd5 75%, #fff7ed 100%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

/* Warm Abstract Shapes */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 60%, rgba(217, 119, 6, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 50% 90%, rgba(180, 83, 9, 0.05) 0%, transparent 45%),
        radial-gradient(ellipse at 70% 30%, rgba(245, 158, 11, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(217, 119, 6, 0.04) 0%, transparent 40%);
    animation: floatShapes 30s ease-in-out infinite;
}

@keyframes floatShapes {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(1deg); }
    66% { transform: translate(-5px, 5px) rotate(-1deg); }
}

/* Glassmorphism Card Effect - Core Style */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow:
        0 8px 32px var(--glass-shadow),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 247, 237, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-color: rgba(255, 220, 180, 0.6);
    box-shadow:
        0 12px 48px rgba(120, 53, 15, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
}

/* Enhanced Glass Card Variant */
.glass-card-enhanced {
    background: rgba(255, 247, 237, 0.3);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 220, 180, 0.5);
    border-radius: 24px;
    box-shadow:
        0 12px 48px rgba(120, 53, 15, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-enhanced:hover {
    background: rgba(255, 247, 237, 0.4);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-color: rgba(255, 220, 180, 0.6);
    box-shadow:
        0 16px 56px rgba(120, 53, 15, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    transform: translateY(-6px);
}

/* Navigation Glass Effect */
.nav-glass {
    background: rgba(255, 247, 237, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 220, 180, 0.4);
    box-shadow: 0 4px 24px rgba(120, 53, 15, 0.08);
}

/* Sidebar Glass Widget */
.glass-widget {
    background: rgba(255, 247, 237, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 220, 180, 0.4);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(120, 53, 15, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.glass-widget:hover {
    background: rgba(255, 247, 237, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 12px 48px rgba(120, 53, 15, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Typography Enhancements */
.text-primary {
    color: #78350f;
}

.text-secondary {
    color: #92400e;
    opacity: 0.7;
}

.text-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Accent Lines */
.accent-line {
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Button Styles with Glass Effect */
.btn-glass {
    background: rgba(255, 247, 237, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 220, 180, 0.6);
    border-radius: 9999px;
    padding: 12px 32px;
    color: #78350f;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-glass:hover {
    background: rgba(255, 247, 237, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(120, 53, 15, 0.1);
}

.btn-primary-sunset {
    background: var(--accent-gradient);
    border: none;
    border-radius: 9999px;
    padding: 12px 32px;
    color: white;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary-sunset:hover {
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

/* Tag Pills with Glass Effect */
.tag-glass {
    background: rgba(245, 158, 11, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #92400e;
    border-radius: 9999px;
    padding: 6px 14px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.tag-glass:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.4);
    color: #78350f;
    transform: scale(1.05);
}

/* Category Links with Glass */
.category-glass {
    background: rgba(255, 247, 237, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 220, 180, 0.4);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.category-glass:hover,
.category-glass.active {
    background: rgba(255, 247, 237, 0.5);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 4px 12px rgba(120, 53, 15, 0.08);
}

.category-glass:hover .text-primary,
.category-glass.active .text-primary {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search Input Glass */
.search-glass {
    background: rgba(255, 247, 237, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 220, 180, 0.6);
    border-radius: 16px;
    padding: 10px 16px;
    transition: all 0.3s ease;
    color: #78350f;
}

.search-glass::placeholder {
    color: rgba(120, 53, 15, 0.5);
}

.search-glass:focus {
    background: rgba(255, 247, 237, 0.7);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
    outline: none;
}

/* Nav Link Styles */
.nav-link {
    color: #78350f;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 12px;
}

.nav-link:hover {
    color: #b45309;
    background: rgba(255, 247, 237, 0.3);
}

/* Markdown Content Styling */
.markdown-content {
    line-height: 1.8;
    color: #78350f;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.markdown-content h1 {
    font-size: 2.25rem;
    border-bottom: 3px solid rgba(245, 158, 11, 0.3);
    padding-bottom: 0.5rem;
}

.markdown-content h2 {
    font-size: 1.75rem;
    border-left: 4px solid var(--sunset-honey);
    padding-left: 1rem;
}

.markdown-content h3 {
    font-size: 1.4rem;
}

.markdown-content p {
    margin-bottom: 1.25rem;
    color: #78350f;
    opacity: 0.85;
}

.markdown-content a {
    color: #d97706;
    text-decoration: none;
    border-bottom: 1px solid rgba(217, 119, 6, 0.3);
    transition: all 0.2s ease;
}

.markdown-content a:hover {
    color: #b45309;
    border-bottom-color: #b45309;
}

.markdown-content code {
    background: rgba(245, 158, 11, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-size: 0.9em;
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.markdown-content pre {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(245, 158, 11, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.markdown-content pre code {
    background: transparent;
    padding: 0;
    color: #f3f4f6;
    border: none;
}

.markdown-content blockquote {
    background: rgba(245, 158, 11, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-left: 4px solid var(--sunset-honey);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #78350f;
}

.markdown-content blockquote p {
    margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
    color: #78350f;
    opacity: 0.85;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(255, 247, 237, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    overflow: hidden;
}

.markdown-content th {
    background: rgba(245, 158, 11, 0.15);
    color: #78350f;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid rgba(245, 158, 11, 0.2);
}

.markdown-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 220, 180, 0.2);
    color: #78350f;
    opacity: 0.85;
}

.markdown-content tr:hover td {
    background: rgba(245, 158, 11, 0.05);
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 1.5rem 0;
    box-shadow: 0 8px 32px rgba(120, 53, 15, 0.15);
    border: 2px solid rgba(255, 220, 180, 0.5);
}

/* Math Formula Styling */
.katex-display {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 247, 237, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    overflow-x: auto;
}

/* Pagination Glass */
.pagination-glass .page-link {
    background: rgba(255, 247, 237, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 220, 180, 0.4);
    border-radius: 12px;
    color: #78350f;
    transition: all 0.2s ease;
}

.pagination-glass .page-link:hover {
    background: rgba(255, 247, 237, 0.5);
    border-color: rgba(245, 158, 11, 0.3);
    color: #b45309;
    transform: translateY(-2px);
}

.pagination-glass .page-link.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* Footer Glass */
.footer-glass {
    background: rgba(255, 247, 237, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 220, 180, 0.4);
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 220, 180, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.4);
    border-radius: 10px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.6);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid rgba(245, 158, 11, 0.15);
    border-top: 3px solid var(--sunset-honey);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Gradient Text Utility */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Link Primary */
.link-primary {
    color: #d97706;
    transition: all 0.2s ease;
}

.link-primary:hover {
    color: #b45309;
}

/* Code Block Styling with Glass Effect */
.markdown-content pre,
pre[class*="language-"] {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
    padding: 1.25rem !important;
    margin: 1.5rem 0;
    overflow-x: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.markdown-content code:not(pre code),
code[class*="language-"],
pre[class*="language-"] code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

/* Inline code styling */
.markdown-content :not(pre) > code {
    background: rgba(245, 158, 11, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 6px;
    padding: 0.2em 0.5em;
    color: #b45309;
    font-size: 0.875em;
}

/* Line numbers plugin */
.line-numbers .line-numbers-rows {
    border-right: 1px solid rgba(245, 158, 11, 0.3);
}

.line-numbers-rows > span:before {
    color: rgba(148, 163, 184, 0.6);
}

/* Toolbar (Copy button) styling */
div.code-toolbar {
    position: relative;
}

div.code-toolbar > .toolbar {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

div.code-toolbar:hover > .toolbar {
    opacity: 1;
}

div.code-toolbar > .toolbar > .toolbar-item > a,
div.code-toolbar > .toolbar > .toolbar-item > button,
div.code-toolbar > .toolbar > .toolbar-item > span {
    background: rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #e2e8f0;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

div.code-toolbar > .toolbar > .toolbar-item > a:hover,
div.code-toolbar > .toolbar > .toolbar-item > button:hover,
div.code-toolbar > .toolbar > .toolbar-item > span:hover {
    background: rgba(245, 158, 11, 0.4);
    border-color: rgba(245, 158, 11, 0.5);
    transform: scale(1.05);
}

/* Prism syntax highlighting color overrides */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6b7280;
}

.token.punctuation {
    color: #9ca3af;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f472b6;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #fbbf24;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #67e8f9;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #f59e0b;
}

.token.function,
.token.class-name {
    color: #fbbf24;
}

.token.regex,
.token.important,
.token.variable {
    color: #f59e0b;
}

/* Custom Code Block Styling */
pre[class*="language-"] {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(120, 53, 15, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    padding: 1.5rem !important;
    margin: 1.5rem 0 !important;
    overflow-x: auto !important;
    position: relative !important;
}

/* Code block with language label */
pre[class*="language-"]::before {
    content: attr(data-language);
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(245, 158, 11, 0.2);
    border-bottom-left-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

code[class*="language-"],
pre[class*="language-"] code {
    font-family: 'Fira Code', 'Cascadia Code', 'Source Code Pro', Consolas, Monaco, 'Courier New', monospace !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    text-shadow: none !important;
    color: #e2e8f0 !important;
}

/* Inline code */
:not(pre) > code {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    padding: 0.2em 0.4em;
    font-size: 0.875em;
    color: #b45309;
    font-weight: 500;
}

/* Line numbers */
.line-numbers .line-numbers-rows {
    border-right: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.line-numbers-rows > span::before {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Toolbar (Copy button) */
div.code-toolbar > .toolbar {
    opacity: 0;
    transition: opacity 0.3s ease;
}

div.code-toolbar:hover > .toolbar {
    opacity: 1;
}

div.code-toolbar > .toolbar > .toolbar-item > button {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 0.4rem 0.8rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

div.code-toolbar > .toolbar > .toolbar-item > button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
}

/* Token colors - Warm theme */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #64748b;
    font-style: italic;
}

.token.punctuation {
    color: #94a3b8;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f472b6;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #67e8f9;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #a5f3fc;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #f59e0b;
    font-weight: 600;
}

.token.function,
.token.class-name {
    color: #fbbf24;
    font-weight: 600;
}

.token.regex,
.token.important,
.token.variable {
    color: #f59e0b;
}

/* ========================================
   Susurrus-Inspired Atmospheric Overlays
   ======================================== */

/* Fabric texture overlay */
.fabric-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.04;
    background-repeat: repeat;
    background-size: 256px 256px;
    background-image: url("data:image/svg+xml,%3Csvg width='256' height='256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

/* Edge mask / vignette overlay */
.edge-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 99;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(120, 53, 15, 0.35) 100%);
}

/* ========================================
   Typography - Susurrus-inspired
   ======================================== */

.font-handwritten {
    font-family: 'Alex Brush', cursive;
}

.poetic-text {
    font-family: 'Alex Brush', cursive;
    font-size: 1.8rem;
    line-height: 1.6;
    color: #78350f;
    text-shadow: 0 2px 12px rgba(245, 158, 11, 0.2);
}
