/* 全体のコンテナ */
.maintenance-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 700px;
    margin: 6rem auto;
    background: rgba(156, 163, 175, 0.05);
    border: 1px solid rgba(156, 163, 175, 0.2);
    border-radius: 2rem;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* グリッチエフェクト付きタイトル */
.maintitle {
    font-size: 1.8rem;
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(34, 58, 192, 0.953);
    position: relative;
    display: inline-block;
}

.maintitle::before, 
.maintitle::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    clip: rect(0, 0, 0, 0);
}

/* ホバー時、またはJSから .is-glitch が付与された時に作動 */
.maintitle:hover::before,
.maintitle.is-glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accentcolor);
    clip: rect(2px, 450px, 120px, 0);
    animation: glitch-anim 0.3s infinite linear alternate-reverse;
}

/* メッセージ文章 */
.maintenance-text {
    font-size: 0.9rem;
    line-height: 2;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    color: var(--accentcolor);
}

/* 注意書きボックス */
.screen {
    background-color: rgba(156, 163, 175, 0.1);
    color: var(--textcolor);
    font-size: 0.80rem;
    text-align: center;
    padding: 0.8rem 1.2rem;
    border-radius: 5px;
    border: 1px dashed rgba(156, 163, 175, 0.3);
    letter-spacing: 1px;
    margin-bottom: 2rem;
    min-height: 1.4em;
    animation: blink 2s infinite alternate;
}

/* データ復元率バー */
.progress-wrapper {
    width: 100%;
    max-width: 400px;
    margin-bottom: 2.5rem;
    text-align: left;
}

.progress-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--accentcolor);
    margin-bottom: 0.4rem;
    font-family: monospace;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(156, 163, 175, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background-color: var(--accentcolor);
    box-shadow: 0 0 10px rgba(34, 58, 192, 0.8);
    transition: width 0.4s ease;
}

/* リンクボタン */
.back-link {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--textcolor);
    background: transparent;
    border: 1px solid var(--accentcolor);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: var(--accentcolor);
    color: var(--maincolor);
    opacity: 0.9;
}

/* アニメーション定義 */
@keyframes blink {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 44px, 0); transform: skew(0.3deg); }
    100% { clip: rect(65px, 9999px, 12px, 0); transform: skew(0.8deg); }
}