:root {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root:lang(en) {
    font-family: "Segoe UI", "Helvetica Neue", "Helvetica", "Arial", "Noto Sans", "FreeSans", "DejaVu Sans", "Liberation Sans", "Bitstream Vera Sans", sans-serif;
}
:root:lang(ja) {
    font-family: "Meiryo", "Yu Gothic", "Hiragino Sans", "MS PGothic", "MS UI Gothic", sans-serif;
}
:root:lang(ko) {
    font-family: 'Malgun Gothic', 'Gulim', 'Nanum Gothic', 'Hwangseong', 'Noto Sans CJK KR', sans-serif;
}
:root:lang(ru) {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', 'Times New Roman', 'Helvetica Neue', 'DejaVu Sans', 'Liberation Sans', sans-serif;
}
:root:lang(zh-cn) {
    font-family: 'Microsoft YaHei', 'SimHei', 'SimSun', 'PingFang SC', 'Heiti SC', 'Songti SC', 'Noto Sans CJK SC', sans-serif;
}
:root:lang(zh-hk) {
    font-family: 'Microsoft YaHei', 'PMingLiU', 'MingLiU', 'PingFang TC', 'Heiti TC', 'Songti TC', 'Noto Sans CJK TC', sans-serif;
}


body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

main {
    max-width: 900px;
    width: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin: auto;
}

h1 {
    color: #2c3e50;
    font-size: 2.8rem;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

main p {
    color: #34495e;
    max-width: 500px;
    margin: auto;
    margin-top: 1em;
    margin-bottom: 1em;
    text-align: center;
}

svg {
    display: inline-block;
    vertical-align: middle;
}

section {
    color: #34495e;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin: 20px;
    text-align: center;
}

h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}
h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}
h2::after, h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

.path {
    color: #2ecc71;
}
.variable {
    color: #3498db;
}

#results {
    width: 60%;
    min-width: 500px;
    margin: auto;
    text-align: start;
}
#results div::before{
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #3498db;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

button {
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    outline: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(45deg, #2980b9, #27ae60);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
button:disabled {
    background: linear-gradient(45deg, #6c6c6c, #7d7d7d);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

button:hover::before {
    transform: translateX(0);
}

a {
    color:#2980b9;
}
a:visited {
    color:#2980b9;
}
a:hover {
    color:#91c9ef;
}

.hidden {
    display:none;
}
@keyframes highlightFade {
    from { background-color: #94e1b4; }
    to   { background-color: #ffffff; }
}
.highlight {
    animation: highlightFade 1s ease-in-out 1 forwards;
    will-change: background-color;
}


