@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900');
@import url('https://fonts.googleapis.com/css?family=Roboto+Condensed:300,400,700');

#garden_container {
    margin: 0 auto;
    /* max-width: 1000px; */
    overflow-x: auto;
    /* border: 1px solid #666; */
    position: relative;
    /* margin-bottom: 100px; */
}
#garden {
    display: block;   /* avoid the inline-baseline gap that adds a vertical scrollbar */
}
#garden_title, #coauthor_hall_of_fame {
}
#coauthor_hall_of_fame {
    max-width: 1000px;
    margin: 0 auto;
}
#garden_title {
    margin-top: 50px;
    margin-bottom: 0;
    background: linear-gradient(180deg, #eaeff8, #eef2fa);
    font-size: 42px;
    line-height: 100px;
    font-weight: 500;
    letter-spacing: 3px;
    text-align: center;
    width: 100%;
    color: #213269;
    font-family: "Roboto Condensed";
    text-shadow: 0 1px 4px rgba(33, 50, 105, 0.1);
}
.stem {
    stroke: #1a7d6d;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    transition: stroke 0.2s, stroke-width 0.2s;
}
.root_stem {
    stroke: #1a7d6d;
    stroke-width: 4;
    stroke-linecap: round;
}
.stem.lineage {
    stroke: #0b5a4d;
    stroke-width: 3.6;
}
.leaf_vein {
    stroke: rgba(255, 255, 255, 0.45);
    stroke-width: 0.8;
    stroke-linecap: round;
}
.hill_back { fill: url(#hill_back_gradient); }
.grass { fill: url(#grass_gradient); }
.tufts path {
    stroke: #4d8a76;
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
}
.sun_glow {
    fill: #fff6d8;
    opacity: 0.55;
    filter: blur(28px);
}
.cloud {
    fill: #ffffff;
    opacity: 0.85;
    animation: cloud-drift 50s ease-in-out infinite alternate;
}
@keyframes cloud-drift {
    from { transform: translateX(-25px); }
    to { transform: translateX(25px); }
}
@media (prefers-reduced-motion: reduce) {
    .cloud { animation: none; }
}
.label {
    paint-order: stroke;
    stroke: rgba(246, 244, 238, 0.9);
    stroke-width: 4px;
    stroke-linejoin: round;
    fill: #1f2a3a;
}
.label:hover { fill: #213269; }
.latest-sign { cursor: pointer; }
.latest-sign rect {
    fill: #d4a843;
    stroke: #8B6914;
    stroke-width: 0.8;
}
.latest-sign text {
    fill: #4a3000;
    font-size: 10px;
    font-weight: 500;
    font-family: Roboto, sans-serif;
}
.flower.lineage .flower_subgroup {
    transform: scale(1.1);
    transition: transform 0.2s;
}
.petal {
    transition: fill 0.2s;
}
.flower {
    cursor: pointer;
}
.flower .flower_subgroup {
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.10));
}
.flower:hover .flower_subgroup {
    transform: scale(1.2);
    transition: transform 0.2s;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.15));
}
.flower:hover .petal {
    opacity: 1 !important;
    cursor: pointer;
}
.selected_flower .flower_subgroup {
    transform: scale(1.5);
    transition: transform 0.2s;
}
.direction-label {
    font-size: 16px;
    font-weight: 500;
    text-anchor: middle;
    fill: #163a33;
    letter-spacing: 0.3px;
}
#flower_template {
    display: none;
}
.plant_label0 {
    font-weight: 700;
    font-size: 16px;
}
.plant_label1 {
    font-weight: 400;
    font-size: 13px;
}
.paper_label0 {
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
}
.paper_label1, .paper_label2, .paper_label3 {
    cursor: pointer;
    font-weight: 300;
    font-size: 14px;
}
.left_child_title {
    text-anchor: end;
}
.indirect_connection {
    stroke: rgba(19, 130, 84, 0.45);
    stroke-width: 1.8;
    stroke-dasharray: 5 4;
    stroke-linecap: round;
    fill: none;
}
.title {
    font-family: "Roboto Condensed";
    font-size: 50px;
    font-weight: 700;
    fill: #213269;
    text-anchor: middle;
    dominant-baseline: middle;
}

/* coauthor hall of fame */
#coauthor_hall_of_fame {
    margin-top: 20px;
}
#coauthor_title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 10px;
    text-align: center;
}
#coauthor_list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.coauthor {
    font-size: 17px;
    padding: 4px 0;
    width: calc(20% - 8px);
    text-align: center;
    line-height: 1.8;
    cursor: pointer;
    background: #f0f0f5;
    border-radius: 16px;
    transition: background-color 0.2s;
    box-sizing: border-box;
}
.coauthor:hover {
    background: #e0e0ee;
}
.selected_coauthor {
    font-weight: 500;
    background: #d8d8ee;
    text-decoration: none;
}
/* paper modal */

#paper_modal_backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
}
#paper_modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 520px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    transform: translate(-50%, -50%);
    background-color: #fff;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 28px;
    box-sizing: border-box;
    display: none;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
#paper_modal_close {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 400;
    color: #666;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
    line-height: 1;
}
#paper_modal_close:hover {
    background-color: #f0f0f0;
    color: #333;
}

#paper_modal_title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 10px;
    display: inline;
}
#paper_modal_venue {
    font-size: 16px;
    font-weight: 300;
    margin-bottom: 10px;
    display: inline;
}
#paper_modal_content {
    font-size: 18px;
    margin-bottom: 10px;
    margin-top: 10px;
}
#paper_modal_links {
    margin-top: 14px;
    text-align: center;
}
#paper_modal_links a {
    display: inline-block;
    padding: 6px 16px;
    margin: 4px 4px;
    border-radius: 16px;
    background: #f0f0f5;
    color: #2a7ae2;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}
#paper_modal_links a:hover {
    background: #e0e0ee;
    text-decoration: none;
}
/* Scroll hint for mobile */
#garden_scroll_hint {
    display: none;
    text-align: center;
    font-size: 14px;
    color: #999;
    padding: 8px 0;
    font-family: "Roboto Condensed";
    letter-spacing: 1px;
}
#garden_title_scroll_hint {
    display: none;
    font-size: 14px;
    color: #7a8ab0;
    font-weight: 400;
    letter-spacing: 0;
}

/* Keyframe animations */
@keyframes fade-hint {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; }
}

@media (max-width: 768px) {
    #garden_title {
        font-size: 24px;
        letter-spacing: 1px;
        line-height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }
    #garden_scroll_hint {
        display: block;
        animation: fade-hint 4s ease-in-out forwards;
    }
    #garden_title_scroll_hint {
        display: inline;
    }
}
/* wooden stakes with the plant names */
.stake_board {
    fill: url(#wood_gradient);
    stroke: #7a4f26;
    stroke-width: 1.2;
    filter: drop-shadow(0 2px 2px rgba(40, 30, 10, 0.25));
}
.stake_post { fill: #8a5a2c; }
.stake_grain {
    stroke: rgba(110, 70, 30, 0.28);
    stroke-width: 1;
    fill: none;
    stroke-linecap: round;
}
.stake_nail { fill: #6b4a2a; }
.stake .direction-label { fill: #4a2c12; letter-spacing: 0.2px; }

/* the garden title, written on a cloud */
.title_cloud_body {
    fill: #ffffff;
    filter: drop-shadow(0 4px 8px rgba(90, 120, 170, 0.18));
}
.garden_cloud_title {
    font-family: "Roboto Condensed", Roboto, sans-serif;
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 2px;
    fill: #213269;
}
#garden_container {
    margin-top: 40px;
}
