:root {
    --bg-color: #020617;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    
    --bg-grad-1: #075985;
    --bg-grad-2: #0f172a;
    --bg-grad-3: #020617;
    
    --h2-grad-1: #f8fafc;
    --h2-grad-2: #94a3b8;
    
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-inner-bg: rgba(23, 23, 23, 0.8);
    --card-inner-hover: rgba(30, 30, 30, 0.8);
    --icon-bg: rgba(255, 255, 255, 0.05);

    --quote-bg: rgba(255, 255, 255, 0.04);
    --quote-border: rgba(255, 255, 255, 0.1);
    
    --ray-1: rgba(251, 191, 36, 0.15);
    --ray-2: rgba(255, 255, 255, 0.1);
    
    --p-shadow: 0 2px 5px rgba(0,0,0,0.5);
    --h2-shadow: drop-shadow(0 2px 10px rgba(0,0,0,0.3));
    --highlight-color: #fbbf24;
    --highlight-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
    
    --audio-online-color: #00ff66;
    --audio-online-shadow: 0 0 5px rgba(0, 255, 102, 0.5);
    --audio-offline-color: #00f3ff;
    --audio-offline-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
    
    --brand-n8n: #ff6d5a;
    --brand-jellyfin: #00a4dc;
    --brand-pdf: #ef4444;
    --brand-portainer: #13b5ea;
    --brand-files: #eab308;
    --brand-metrics: #10b981;
    --brand-it-tools: #3b82f6;
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    
    --bg-grad-1: #e0f2fe;
    --bg-grad-2: #bae6fd;
    --bg-grad-3: #f1f5f9;
    
    --h2-grad-1: #0f172a;
    --h2-grad-2: #475569;

    --card-bg: rgba(0, 0, 0, 0.02);
    --card-border: rgba(0, 0, 0, 0.08);
    --card-inner-bg: rgba(255, 255, 255, 0.65);
    --card-inner-hover: rgba(255, 255, 255, 0.9);
    --icon-bg: rgba(0, 0, 0, 0.03);

    --quote-bg: rgba(255, 255, 255, 0.6);
    --quote-border: rgba(0, 0, 0, 0.08);
    
    --ray-1: rgba(251, 191, 36, 0.4);
    --ray-2: rgba(14, 165, 233, 0.3);
    
    --p-shadow: 0 1px 1px rgba(255,255,255,0.8);
    --h2-shadow: none;
    --highlight-color: #d97706;
    --highlight-shadow: none;
    
    --audio-online-color: #16a34a;
    --audio-online-shadow: none;
    --audio-offline-color: #0284c7;
    --audio-offline-shadow: none;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at var(--bg-mouse-x, 50%) var(--bg-mouse-y, 120%), var(--bg-grad-1) 0%, var(--bg-grad-2) 40%, var(--bg-grad-3) 90%);
    animation: breathingLight 15s ease-in-out infinite alternate;
}

.background-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 4px
    );
    pointer-events: none;
}

.light-ray {
    position: absolute;
    bottom: -20%;
    left: 50%;
    width: 150vw;
    height: 150vh;
    background: conic-gradient(from 180deg at 50% 100%, transparent 0deg, var(--ray-1) 45deg, transparent 90deg);
    transform-origin: bottom center;
    animation: rotateRays 30s linear infinite;
    margin-left: -75vw;
}

.light-ray:nth-child(2) {
    animation-duration: 40s;
    animation-direction: reverse;
    opacity: 0.6;
    background: conic-gradient(from 180deg at 50% 100%, transparent 0deg, var(--ray-2) 60deg, transparent 120deg);
}

@keyframes breathingLight {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

@keyframes rotateRays {
    0% { transform: rotate(-20deg); }
    50% { transform: rotate(20deg); }
    100% { transform: rotate(-20deg); }
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 3rem 2rem;
    z-index: 1;
}

/* Scroll Reveal Animation */
.section-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

section {
    margin-bottom: 8rem;
}

section h2 {
    font-family: 'Lora', serif;
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--h2-grad-1) 0%, var(--h2-grad-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: var(--h2-shadow);
    text-align: center;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    text-align: center;
}

.manifesto p {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    text-shadow: var(--p-shadow);
}

.manifesto p strong {
    color: var(--highlight-color);
    font-weight: 600;
    text-shadow: var(--highlight-shadow);
}

/* Quotes Grid */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.quote-card {
    padding: 2.5rem;
    border-radius: 16px;
    background-color: var(--quote-bg);
    border: 1px solid var(--quote-border);
    position: relative;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.quote-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.3);
}

.quote-card .quote-mark {
    font-size: 2rem;
    color: #fbbf24;
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.quote-card blockquote {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: var(--text-primary);
}

.quote-card cite {
    font-size: 0.95rem;
    color: #fbbf24;
    font-weight: 600;
}

header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeDown 1s ease-out;
}

header h1 {
    font-family: 'Lora', serif;
    font-size: 4.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 4px 15px rgba(14, 165, 233, 0.25));
}

header h1::after {
    content: '|';
    position: absolute;
    right: -25px;
    top: 0;
    color: #fbbf24;
    -webkit-text-fill-color: #fbbf24;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.quote-container {
    background: var(--quote-bg);
    border: 1px solid var(--quote-border);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 650px;
    margin: 0 auto;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: opacity 0.5s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.quote-container.fade-out {
    opacity: 0;
}

.daily-quote {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

cite {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Glassmorphism Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    cursor: pointer;
    animation: fadeInUp 0.8s ease-out backwards;
    transform-style: preserve-3d;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card:hover::before {
    opacity: 1;
}

.card::before,
.card-border {
    content: "";
    border-radius: inherit;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: opacity 500ms;
    pointer-events: none;
}

.card::before {
    background: radial-gradient(
        800px circle at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.06),
        transparent 40%
    );
    z-index: 3;
}

.card-border {
    background: radial-gradient(
        400px circle at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.3),
        transparent 40%
    );
    z-index: 1;
}

.card-inner {
    background-color: var(--card-inner-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: inherit;
    margin: 1px;
    height: calc(100% - 2px);
    width: calc(100% - 2px);
    display: flex;
    align-items: center;
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    transition: background-color 0.3s ease;
    transform: translateZ(20px);
}

.card:hover .card-inner {
    background-color: var(--card-inner-hover);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1.25rem;
    background: var(--icon-bg);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.08) rotate(5deg);
}

.card-icon i {
    font-size: 32px;
}

/* Brand Colors */
.n8n-icon { color: var(--brand-n8n); box-shadow: inset 0 0 20px rgba(255, 109, 90, 0.1); }
.jellyfin-icon { color: var(--brand-jellyfin); box-shadow: inset 0 0 20px rgba(0, 164, 220, 0.1); }
.pdf-icon { color: var(--brand-pdf); box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.1); }
.portainer-icon { color: var(--brand-portainer); box-shadow: inset 0 0 20px rgba(19, 181, 234, 0.1); }
.files-icon { color: var(--brand-files); box-shadow: inset 0 0 20px rgba(234, 179, 8, 0.1); }
.metrics-icon { color: var(--brand-metrics); box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.1); }
.it-tools-icon { color: var(--brand-it-tools); box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.1); }
.custom-icon { color: #a855f7; box-shadow: inset 0 0 20px rgba(168, 85, 247, 0.1); }

.card-content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.savings-tag, .replace-tag, .alt-tag, .cost-saved-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.savings-tag {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.05);
}

.replace-tag {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.05);
}

.card:hover .savings-tag {
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
}

.card:hover .replace-tag {
    background: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.alt-tag {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.05);
}

.card:hover .alt-tag {
    background: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
    transform: translateY(-1px);
}

.cost-saved-tag {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.25);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.05);
}

.card:hover .cost-saved-tag {
    background: rgba(14, 165, 233, 0.25);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.1);
    transform: translateY(-1px);
}

/* Footer */
footer {
    margin-top: 5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    animation: fadeInUp 1s ease-out 0.8s backwards;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #fbbf24;
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 12px #fbbf24;
    animation: pulse 2s infinite;
}

/* Animations */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
    100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.spark {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #fbbf24;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 0 8px #fbbf24, 0 0 15px #fde047;
    animation: sparkAnim 1s ease-out forwards;
}

@keyframes sparkAnim {
    0% { transform: scale(1) translate(0, 0); opacity: 1; }
    100% { transform: scale(0) translate(var(--tx), var(--ty)); opacity: 0; }
}

.controls-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 12px;
    z-index: 100;
}

.theme-toggle, .audio-control {
    color: var(--text-secondary);
    cursor: pointer;
    border: 1px solid rgba(150, 150, 150, 0.2);
    border-radius: 30px;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    background: var(--quote-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.theme-toggle {
    padding: 10px 16px;
    font-size: 1rem;
}

.theme-toggle:hover, .audio-control:hover {
    background: var(--card-inner-hover);
    color: var(--text-primary);
    border-color: rgba(150, 150, 150, 0.4);
}

.audio-online {
    border-color: var(--audio-online-color) !important;
    color: var(--audio-online-color) !important;
    text-shadow: var(--audio-online-shadow) !important;
}

.audio-offline {
    border-color: var(--audio-offline-color) !important;
    color: var(--audio-offline-color) !important;
    text-shadow: var(--audio-offline-shadow) !important;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 { font-size: 2.8rem; letter-spacing: -1px; }
    header p { font-size: 1rem; }
    .container { padding: 1rem; }
    .grid { grid-template-columns: 1fr; gap: 1rem; }
    header { margin-bottom: 2rem; }
    .controls-container {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }
    .theme-toggle, .audio-control {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
}

/* New Animations */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, #0ea5e9, #fbbf24);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
}

.floating-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1.5); opacity: 0; }
}

