/* --- Global Styles --- */
body {
    font-family: 'Roboto', "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.03);
}

/* --- Typography --- */
h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
    line-height: 1.2;
    color: #222;
}
h2 {
    font-size: 1.5em;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #444;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
h3 {
    font-size: 1.2em;
    margin-top: 30px;
    color: #555;
}
p { margin-bottom: 15px; }

.authors { font-size: 1.1em; margin-top: 20px; }
.affiliations { font-size: 0.95em; color: #111; margin-bottom: 20px; }
.conference { font-weight: bold; color: #222; margin-bottom: 20px; }
.conference-secondary { font-size: 0.7em; color: #666;}

/* --- Language Switcher --- */
.lang-switch {
    position: absolute;
    top: 10px;
    right: 20px;
}
.lang-btn {
    background: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9em;
    border-radius: 4px;
    transition: all 0.2s;
}
.lang-btn.active {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

/* --- CSS Based Language Toggling --- */
/* Default: English visible, Japanese hidden */
.jp-text { display: none; }

/* When body has class 'lang-jp': Japanese visible, English hidden */
body.lang-jp .en-text { display: none; }
body.lang-jp .jp-text { display: block; }

/* Inline text toggling */
body.lang-jp span.en-text { display: none; }
body.lang-jp span.jp-text { display: inline; }

/* --- Buttons / Links --- */
.link-block { margin: 30px 0; }
.btn {
    display: inline-block;
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    margin: 5px;
    transition: background-color 0.3s, transform 0.1s;
    font-size: 0.9rem;
}
.btn:hover { background-color: #555; transform: translateY(-2px); }
.btn i { margin-right: 6px; }

/* --- Images & Video --- */
img, video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}
.caption {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-bottom: 40px;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    margin-bottom: 20px;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

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

.grid-item { text-align: center; }
.grid-item p { font-size: 0.9em; margin-top: 8px; line-height: 1.4; }

/* --- Code Block --- */
pre {
    background: #f4f4f4;
    padding: 15px;
    text-align: left;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 0.85em;
    border: 1px solid #eee;
}

/* --- Footer --- */
footer {
    margin-top: 60px;
    font-size: 0.8em;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
