/* ===== 舊版樣式兼容層 ===== */
/* 這個文件提供舊版 class 與新版設計系統的兼容 */

/* 基本佈局類別 */
.horizontal-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.vertical-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 文字大小類別 */
.text-level-1 {
    font-size: 32px;
    line-height: 40px;
    color: var(--text-primary);
}

.text-level-2 {
    font-size: 28px;
    line-height: 36px;
    color: var(--text-primary);
}

.text-level-3 {
    font-size: 24px;
    line-height: 32px;
    color: var(--text-primary);
}

.text-level-4 {
    font-size: 20px;
    line-height: 28px;
    color: var(--text-primary);
}

.text-level-5 {
    font-size: 16px;
    line-height: 24px;
    color: var(--text-primary);
}

.text-level-6 {
    font-size: 12px;
    line-height: 20px;
    color: var(--text-primary);
}

/* 舊版選單系統 */
#menu-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

#menu-top > a {
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
}

#menu-top > a:hover {
    background: #f5f5f5;
}

#menu-top > a > span {
    padding: 2px 0;
    border-width: 2px;
}

@media(min-width: 851px) {
    #menu-top > .mobile {
        display: none;
    }
}

@media(max-width: 850px) {
    #menu-top > .desktop {
        display: none;
    }
}

#menu-right {
    display: none;
    position: fixed;
    top: 50px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 50px);
    background-color: #ffffff;
    z-index: 1000;
    align-items: start;
    justify-content: start;
}

@media(min-width: 851px) {
    #menu-right {
        display: none !important;
    }
}

#menu-right > a {
    width: 100%;
    cursor: pointer;
    padding: 10px 20px;
    gap: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    transition: all 0.3s ease;
}

#menu-right > a:hover {
    background: #f5f5f5;
}

#menu-right > a > .icon {
    width: 11px;
    height: 11px;
    opacity: 0.0;
}

/* 主體內容區塊 */
body > .vertical-layout {
    padding-top: 50px;
}

/* 兼容舊版樣式ID */
#more-internal {
    padding: 0 40px;
    max-width: 1000px;
    line-height: 1.8;
}

@media(max-width: 700px) {
    #more-internal {
        padding: 0 20px;
    }
}

#certificate-group {
    width: calc(100vw - 80px);
    max-width: 1000px;
    gap: 40px;
}

@media(max-width: 700px) {
    #certificate-group {
        width: calc(100vw - 40px);
    }
}

#certificate-group > .level {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: normal;
    justify-content: start;
    gap: 20px;
}

@media(max-width: 700px) {
    #certificate-group > .level {
        flex-direction: column;
        gap: 40px;
    }
}

#certificate-group > .level > .school {
    max-height: 100%;
    width: 185px;
    background-color: #ffc107;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    overflow: hidden;
}

@media(max-width: 700px) {
    #certificate-group > .level > .school {
        height: 100px;
        width: 100%;
    }
}

#certificate-group > .level > .school > div {
    margin: auto 0;
    padding: 10px 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

#certificate-group > .level > .school > div > span {
    font-weight: bold;
    color: #ffffff;
}

#certificate-group > .level > .entries {
    width: 100%;
    gap: 20px;
    justify-content: start;
    align-items: start;
    display: flex;
    flex-direction: column;
}

#certificate-group > .level > .entries > a {
    width: 100%;
    justify-content: start;
    align-items: start;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

#certificate-group > .level > .entries > a:hover {
    background-color: rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

#certificate-group > .level > .entries > a > .title {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

#certificate-group > .level > .entries > a > .title > span {
    font-weight: bold;
    flex-grow: 1;
}

#certificate-group > .level > .entries > a > .title > img {
    width: 23px;
    height: 23px;
    opacity: 0.6;
}

/* 歷史記錄 */
#historical-record {
    width: calc(100vw - 80px);
    max-width: 1000px;
}

#historical-record > div {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: normal;
    justify-content: start;
    gap: 15px;
    margin-bottom: 30px;
}

#historical-record > div > .time {
    margin: auto 0;
    font-weight: bold;
    font-family: monospace;
    color: var(--primary-color);
    min-width: 100px;
}

@media(max-width: 700px) {
    #historical-record > div > .time {
        width: 50px;
        min-width: 50px;
        word-wrap: break-word;
    }
}

#historical-record > div > .divider {
    position: relative;
    width: 10px;
    max-height: 100%;
}

#historical-record > div > .divider > .top {
    position: absolute;
    top: 0;
    right: calc(50% - 1px);
    width: 2px;
    height: 50%;
    background: linear-gradient(180deg, transparent, var(--primary-color));
}

#historical-record > div > .divider > .center {
    position: absolute;
    top: calc(50% - 6px);
    right: calc(50% - 6px);
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

#historical-record > div > .divider > .bottom {
    position: absolute;
    bottom: 0;
    right: calc(50% - 1px);
    width: 2px;
    height: 50%;
    background: linear-gradient(180deg, var(--primary-color), transparent);
}

#historical-record > div > .context {
    width: 100%;
    padding: 15px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    line-height: 1.7;
    color: var(--text-secondary);
}