/* =============================================
   小卢的叽里咕卢
   Aesthetic: soft editorial / warm personal journal
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Noto+Serif+SC:wght@400;600&display=swap');

/* ---- CSS Variables ---- */
:root {
    --blue:        #4a7bd4;
    --blue-light:  #6b95db;
    --blue-soft:   #e8eef9;
    --bg:          #f7f5f2;
    --surface:     #ffffff;
    --text:        #2a2a35;
    --text-muted:  #6b6b7e;
    --border:      #e4e0d8;
    --accent:      #e8a87c;
    --radius:      12px;
    --shadow:      0 2px 12px rgba(74, 123, 212, 0.10);
    --shadow-hover:0 6px 24px rgba(74, 123, 212, 0.18);
    --transition:  0.22s ease;
}

html {
    scroll-behavior: smooth;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Poppins', 'Noto Serif SC', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    zoom: 0.9;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Poppins', 'Noto Serif SC', sans-serif;
    font-weight: 600;
}

/* ---- HEADER ---- */
header {
    background: linear-gradient(135deg, #4a7bd4 0%, #6b95db 60%, #8db3e8 100%);
    padding: 36px 24px 28px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* subtle decorative circles in header */
header::before,
header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    pointer-events: none;
}
header::before {
    width: 280px; height: 280px;
    background: #fff;
    top: -100px; left: -60px;
}
header::after {
    width: 200px; height: 200px;
    background: #fff;
    bottom: -80px; right: -40px;
}

header h1 {
    font-size: 32px;
    margin: 0 0 10px;
    letter-spacing: 0.02em;
}

header p {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255,255,255,0.9);
    margin: 0;
    max-width: 520px;
    margin-inline: auto;
}

/* ---- LANG SWITCH ---- */
.lang-switch {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
}

.lang-switch a {
    background: rgba(255,255,255,0.22);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background var(--transition);
    border: 1px solid rgba(255,255,255,0.3);
}
.lang-switch a:hover { background: rgba(255,255,255,0.38); }

/* ---- INFO BUTTON ---- */
.info-btn {
    margin-top: 14px;
    padding: 7px 16px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background var(--transition);
}
.info-btn:hover { background: rgba(255,255,255,0.32); }

/* ---- MODAL ---- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background: rgba(30, 30, 50, 0.55);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--surface);
    margin: 8% auto;
    padding: 28px 36px;
    border-radius: 16px;
    width: 88%;
    max-width: 680px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    box-shadow: 0 16px 48px rgba(0,0,0,0.22);
    position: relative;
    animation: modalIn 0.25s ease;
}

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

blockquote {
    margin: 20px 0;
    padding: 12px 20px;
    border-left: 4px solid var(--blue);
    background: var(--blue-soft);
    font-style: italic;
    color: #444;
    border-radius: 0 8px 8px 0;
}

.close {
    position: absolute;
    top: 14px; right: 18px;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
}
.close:hover { color: var(--text); }

/* ---- NAV ---- */
nav {
    background-color: #2a2a35;
    display: flex;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

nav a {
    color: rgba(255,255,255,0.82);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    padding: 13px 20px;
    display: inline-block;
    transition: background-color var(--transition), color var(--transition);
    letter-spacing: 0.01em;
}

nav a:hover {
    background-color: rgba(255,255,255,0.10);
    color: #fff;
}

/* ---- SECTIONS ---- */
section {
    padding: 32px 24px;
    max-width: 1040px;
    margin: 0 auto;
}

h2 {
    font-size: 22px;
    border-bottom: 2px solid var(--blue-soft);
    padding-bottom: 8px;
    margin-bottom: 20px;
    color: var(--text);
    position: relative;
}
h2::after {
    content: '';
    display: block;
    position: absolute;
    bottom: -2px; left: 0;
    width: 48px; height: 2px;
    background: var(--blue);
    border-radius: 2px;
}

/* ---- TYPE CARDS (movies / music categories) ---- */
.type-card {
    background: var(--surface);
    padding: 22px 18px;
    width: 150px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    margin: 8px;
    border: 1.5px solid var(--border);
}

.type-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--shadow-hover);
    background: var(--blue-soft);
    border-color: var(--blue-light);
}

.type-card h3 {
    margin: 0;
    font-size: 17px;
    color: var(--blue);
}

/* ---- BACK BUTTON ---- */
.back-btn {
    width: 200px;
    height: 44px;
    cursor: pointer;
    background-color: var(--blue);
    border: none;
    color: white;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    transition: background-color var(--transition), transform var(--transition);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.back-btn:hover {
    background-color: var(--blue-light);
    transform: translateX(-3px);
}

/* ---- CARD CONTAINER ---- */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px;
}

/* ---- CARDS (movies, food, music) ---- */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    width: 235px;
    border: 1.5px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.card h3 {
    margin: 6px 0 4px;
    font-size: 15px;
    color: var(--text);
}

.card p {
    margin: 3px 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* card links */
.card a {
    color: var(--blue);
    text-decoration: none;
    transition: color var(--transition);
}
.card a:hover {
    color: var(--blue-light);
    text-decoration: underline;
}

/* ---- QUOTE CARDS ---- */
.quote-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
}

.quote-card {
    background: var(--surface);
    padding: 18px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 320px;
    border: 1.5px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

.quote-card::before {
    content: '"';
    position: absolute;
    top: -8px; left: 10px;
    font-size: 72px;
    color: var(--blue-soft);
    font-family: Georgia, serif;
    line-height: 1;
    pointer-events: none;
    z-index: 0;
}

.quote-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.quote-card .chinese {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.quote-card .english {
    font-style: italic;
    color: var(--text-muted);
    font-size: 14px;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

/* ---- FOOD SECTION ---- */
#food .card h3 {
    font-size: 15px;
    margin: 4px 0;
    color: var(--text);
}

#food .card p {
    font-size: 13px;
    margin: 4px 0;
    line-height: 1.5;
}

/* ---- MUSIC SECTION ---- */
#music .card h3 {
    font-size: 15px;
    margin: 6px 0;
}

#music .card p {
    font-size: 13px;
    margin: 3px 0;
    line-height: 1.5;
}

/* ---- PHOTO WALL ---- */
.photo-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
    align-items: flex-start;
}

.photo-card {
    width: 23%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--surface);
    overflow: hidden;
    border: 1.5px solid var(--border);
    transition: box-shadow var(--transition), transform var(--transition);
}

.photo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.photo-card summary {
    list-style: none;
    cursor: pointer;
}

.photo-card summary img {
    width: 100%;
    display: block;
    border-bottom: 1px solid var(--border);
    transition: opacity var(--transition);
}

.photo-card summary:hover img {
    opacity: 0.92;
}

.photo-card summary p {
    text-align: center;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 10px;
    color: var(--text);
}

.photo-card summary::-webkit-details-marker { display: none; }

.photo-detail {
    padding: 4px 12px 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--blue-soft);
}

.photo-detail p { margin: 5px 0; }

/* rotate the chevron when details is open */
details[open] summary .fa-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.2s;
}

.photo-card summary .fa-chevron-down {
    transition: transform 0.2s;
}

/* ---- FOOTER ---- */
footer {
    text-align: center;
    padding: 18px;
    background-color: #2a2a35;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    margin-top: 32px;
    letter-spacing: 0.02em;
}

/* ================== MOBILE ================== */
@media only screen and (max-width: 600px) {
    header { padding: 20px 16px 18px; }
    header h1 { font-size: 22px; }
    header p  { font-size: 13px; }

    .lang-switch a { padding: 4px 10px; font-size: 0.72rem; }
    .info-btn       { padding: 5px 10px; font-size: 0.75rem; }

    nav { display: flex; justify-content: space-around; flex-wrap: nowrap; }
    nav a { font-size: 13px; padding: 10px 8px; }

    section { padding: 20px 14px; }

    #movie-types { display: flex; flex-wrap: wrap; justify-content: center; }
    #movie-types .type-card { width: 28%; margin: 4px; padding: 14px 8px; }

    .back-btn {
        width: 95%;
        height: 40px;
        font-size: 14px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 10px;
        margin: 0 auto 14px auto;
    }

    #movie-content .card {
        width: 47%;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        padding: 12px;
    }

    #movie-content .card img { height: 160px; }
    #movie-content .card h3  { font-size: 13px; }
    #movie-content .card p   { font-size: 12px; }

    .quote-card, .card { width: 47%; }
    .quote-card .chinese { font-size: 14px; }
    .quote-card .english { font-size: 12px; }
    .quote-card::before  { font-size: 52px; }

    #food .card h3 { font-size: 14px; }
    #food .card p  { font-size: 12px; }

    #music-types { display: flex; flex-wrap: wrap; justify-content: center; }
    #music-types .type-card { width: 28%; margin: 4px; padding: 14px 8px; }

    #music-content .card { width: 47%; box-sizing: border-box; padding: 12px; }
    #music-content .card h3 { font-size: 13px; }
    #music-content .card p  { font-size: 12px; }

    .photo-container { margin-left: 0; gap: 12px; }
    .photo-card      { width: 48%; }
    .photo-detail    { font-size: 12px; }
    .photo-card summary p { font-size: 13px; }

    footer { font-size: 11px; padding: 12px; }
}

/* ================== TABLET ================== */
@media only screen and (min-width: 601px) and (max-width: 1400px) {
    header h1 { font-size: 26px; }
    header p  { font-size: 15px; }

    nav a { font-size: 16px; padding: 12px 18px; }

    .card-container { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 14px; }
    .photo-container { justify-content: flex-start; }
    .back-btn { width: 200px; height: 44px; font-size: 15px; }

    .photo-card summary::-webkit-details-marker { display: none; }
}