/* ベーススタイル（黒背景・白文字） */
body {
    background-color: #0a0a0a;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 40px 20px;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 100px;
    /* ヘッダー分の余白 */
    font-size: 2rem;
    letter-spacing: 2px;
}

/* ヘッダー */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
}

.header-left {
    display: flex;
    gap: 32px;
    align-items: center;
}

.header-right {
    display: flex;
    gap: 32px;
    align-items: center;
}

.header-link {
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.header-link img {
    height: 24px;
    width: auto;
    display: block;
}

.header-link.logo-main img {
    height: 32px;
}


/* グリッドレイアウトでカードを並べる */
#app {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 各アニメーションのコンテナ */
.card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #aaaaaa;
    font-size: 1.1rem;
    font-weight: normal;
}

/* アニメーションを描画するエリア */
.text-container {
    flex-grow: 1;
    min-height: 80px;
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 300;
    overflow: hidden;
    letter-spacing: 0.05em;
}

/* 1文字ずつの要素に適用するクラス */
.char {
    display: inline-block;
    white-space: pre;
}

/* ボタンエリア */
.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-btn {
    padding: 8px 14px;
    background: #333333;
    color: #ffffff;
    border: 1px solid #555;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    flex: 1;
}

.action-btn:hover {
    background: #ffffff;
    color: #000000;
}

.action-btn.copy-btn {
    background: #2a2a4a;
    border-color: #4a4a8a;
}

.action-btn.copy-btn:hover {
    background: #5a5aff;
    color: white;
    border-color: #7a7aff;
}

/* トースト通知のスタイル */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #4caf50;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease, visibility 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* ローディング画面 */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* 無限スクロール用センチネル */
#observer-sentinel {
    height: 50px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}