:root {
    --bg-color: #0A0F1A;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(6, 182, 212, 0.35);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --accent-blue: #3B82F6;
    --neon-blue: #06B6D4;
    --glow: rgba(59, 130, 246, 0.5);
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #111827 0%, #0A0F1A 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
}

.orb-1 {
    width: 600px; height: 500px;
    background: radial-gradient(ellipse at center, rgba(109, 40, 217, 0.4) 0%, transparent 60%);
    top: -150px; left: -150px;
    animation: simpleSpin 18s infinite linear;
}

.orb-2 {
    width: 700px; height: 600px;
    background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.3) 0%, transparent 60%);
    bottom: -250px; right: -150px;
    animation: simpleSpin 22s infinite linear reverse;
}

.orb-3 {
    width: 500px; height: 400px;
    background: radial-gradient(ellipse at center, rgba(30, 64, 175, 0.4) 0%, transparent 60%);
    top: 40%; left: 40%;
    transform-origin: center center;
    animation: simpleSpin 20s infinite linear;
}

@keyframes simpleSpin {
    0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
    50%  { transform: translate(40px, -20px) scale(1.05) rotate(180deg); }
    100% { transform: translate(0, 0) scale(1) rotate(360deg); }
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

header {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeInDown 1s ease-out forwards;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--neon-blue);
    text-shadow: 0 0 20px var(--glow);
}

header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Grid System */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Cards */
.card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Stagger Animation */
.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(n+6) { animation-delay: 0.6s; }

.card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.2);
    z-index: 10;
}

/* Image Cards */
.image-card {
    background: #000;
    height: 400px;
    border: 1px solid transparent;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.image-card:hover img {
    transform: scale(1.1);
}

.image-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 15, 26, 0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.image-card:hover::after {
    opacity: 1;
}

/* Quote Cards (Glassmorphism) */
.quote-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--card-border);
    box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.15);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 400px;
    text-align: center;
}

.quote-card:hover {
    border-color: rgba(6, 182, 212, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.quote-card blockquote {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.4;
    position: relative;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.quote-card blockquote::before {
    content: '"';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    color: var(--neon-blue);
    opacity: 0.3;
    font-family: serif;
}

.quote-card cite {
    font-size: 1rem;
    color: var(--accent-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-style: normal;
}

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

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

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #1E293B;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* -- SEARCH & TAGS UPDATE -- */
.search-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

#year-search {
    padding: 1rem 2rem;
    width: 100%;
    max-width: 400px;
    border-radius: 50px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    backdrop-filter: blur(8px);
}

#year-search::placeholder {
    color: var(--text-secondary);
}

#year-search:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.section-title {
    font-size: 2.5rem;
    margin: 3rem 0;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 3px;
    background: var(--accent-blue);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--neon-blue);
}

/* Tags */
.tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(10, 15, 26, 0.7);
    border: 1px solid var(--neon-blue);
    color: var(--text-primary);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 5;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 10px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
}

.card:hover .tag {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.8);
}

/* Hide Utility for Search */
.card.hidden {
    display: none !important;
}


/* --- PHASE 2 SUPPLEMENT --- */
/* Filter styles overrides */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    font-family: var(--font-main);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
    border-color: var(--neon-blue);
}

/* Hide original search bar if present */
.search-container {
    display: none !important;
}

/* 3D Flip Card Styles */
.image-card {
    height: 400px;
    background: transparent;
    border: none;
    perspective: 1000px; 
}
.image-card::after { display: none; }

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    cursor: pointer;
    border-radius: 20px;
}

.image-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    border: 2px solid rgba(6, 182, 212, 0.9);
    box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.15), 0 10px 30px rgba(0,0,0,0.5);
}

.card-back {
    transform: rotateY(180deg);
}

.card-front img, .card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.image-card:hover .card-front img, .image-card:hover .card-back img {
    transform: scale(1.05);
}

.card-front::after {
    content: "?? Klikni pro odhalení vzpomínky";
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.image-card:hover:not(.flipped) .card-front::after {
    opacity: 1;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 0;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(15px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.show {
    opacity: 1;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 50px;
    font-weight: 300;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
    z-index: 10000;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--neon-blue);
    text-decoration: none;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.2);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    object-fit: contain;
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}


/* --- NAVBAR STYLES --- */
html {
    scroll-behavior: smooth;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 4rem;
    background: rgba(10, 15, 26, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--card-border);
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link:focus {
    color: var(--text-primary);
}

.nav-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 0;
    background-color: var(--neon-blue);
    transition: width 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--neon-blue);
}

.nav-link:hover::after, .nav-link:focus::after {
    width: 100%;
}

.container {
    padding-top: 8rem;
}

.section-title {
    scroll-margin-top: 100px;
}

