/* HackerFOMO - Dark theme stylesheet with card and slideshow styles */

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --text-color: #eaeaea;
    --text-muted: #888;
    --link-color: #4da8da;
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Canvas background — absolute positioned, full screen, behind content */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#animation-canvas {
    display: block;
}

/* Header */
.header {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 3rem 2rem 1rem;
    animation: fadeInUp 0.6s ease forwards;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.header .tagline {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

/* Slideshow grid — auto-play mode shows 3-5 cards at a time */
.slideshow {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Scroll container — shows all cards */
.scroll-container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Card */
.card {
    background: rgba(22, 33, 62, 0.85);
    border-radius: 12px;
    padding: 2rem;
    transition: opacity 0.4s ease, transform 0.4s ease;
    cursor: pointer;
    border: 1px solid rgba(77, 168, 218, 0.1);
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(77, 168, 218, 0.35);
}

.card.hot {
    border-left: 3px solid #e8853d;
    box-shadow: 0 0 20px rgba(232, 133, 61, 0.3);
}

.card .title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    color: white;
    margin-bottom: 0.5rem;
}

.card .description {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(234, 234, 234, 0.75);
    margin-bottom: 1rem;
}

.card .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.card .reply-badge {
    background: rgba(77, 168, 218, 0.2);
    color: #4da8da;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.card .source-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.6;
}

.card .source-link:hover {
    opacity: 1;
}

/* Controls — fixed bottom-right */
.controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: rgba(22, 33, 62, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(77, 168, 218, 0.2);
}

.controls button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
}

.controls button:hover {
    color: #4da8da;
}

#speed-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 30px;
    text-align: center;
}

/* Progress bar */
.progress-bar-container {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.progress-bar {
    height: 2px;
    background: linear-gradient(90deg, rgba(232, 133, 61, 0.6), rgba(77, 168, 218, 0.6));
    width: 0%;
    border-radius: 1px;
    transition: width 0.3s linear;
}

.progress-bar.running {
    transition: none;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 100;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.footer a {
    color: var(--text-muted);
    text-decoration: underline;
}

.footer:hover {
    opacity: 1;
}

/* Utility classes */
.hidden {
    display: none;
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.fade-out {
    animation: fadeOutDown 0.4s ease forwards;
}

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

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
        letter-spacing: 0.2em;
    }

    .card .title {
        font-size: 1.2rem;
    }

    .card .description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .slideshow {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .scroll-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}
