/* プリロードフォント設定 */
@font-face {
    font-family: 'Share Tech Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/sharetechmono/v15/J7aHnp1uDWRBEqV98dVQztYldFcLowEF.woff2) format('woff2');
}

/* 関税発動タイマーの固定幅設定 */
#countdown-activation {
    font-family: 'Share Tech Mono', monospace !important;
    width: 140px !important;
    text-align: center !important;
    display: inline-block !important;
    letter-spacing: 0 !important;
    font-variant-numeric: tabular-nums !important;
    font-feature-settings: "tnum" !important;
    -webkit-font-feature-settings: "tnum" !important;
    margin: 0 auto !important;
}


/* スクロールコンテンツの末尾要素に余白を追加 */
.tab-content > *:last-child {
    margin-bottom: 70px; /* 下部の余白をさらに増やす (40px→70px) */
}

/* 検索結果グリッドやカード要素の下部にも余白を確保 */
.results-grid, .grid-container {
    margin-bottom: 80px; /* 下部の余白をさらに増やす (50px→80px) */
}

/* カードの最後の行にも余白を確保 */
.cards:last-child, .card:last-child {
    margin-bottom: 70px; /* 下部の余白をさらに増やす (40px→70px) */
}

/* 特別な余白クラス - コンテンツの最後に適用 */
.bottom-spacer {
    height: 100px;
    width: 100%;
    clear: both;
    display: block;
}

/* タブコンテンツ全体に下部余白を追加 */
.tab-content {
    padding-bottom: 100px !important; /* 強制的に大きな下部余白を確保 */
}

/* モバイルでも余白を確保 */
@media screen and (max-width: 768px) {
    .bottom-spacer {
        height: 150px; /* モバイルではさらに余白を増やす */
    }
    .tab-content {
        padding-bottom: 150px !important;
    }
}

/* Financial Juice ウィジェット用スタイル */
#financialjuice-widget-container {
    position: fixed;
    left: 10px;
    top: 370px; /* タブコンテンツの開始位置(230px) + 140px下げる */
    z-index: 900;
    display: none; /* 初期状態は非表示 */
}

/* より大きい画面のみウィジェットを表示 */
@media screen and (min-width: 1400px) {
    #financialjuice-widget-container {
        display: block;
    }
    .content-container {
        margin-left: 320px; /* ウィジェットの幅+余白分 */
        margin-right: 320px; /* 右側TOP20表示分の余白 */
    }
}

/* TOP20右側固定表示のスタイル */
#top20-widget-container {
    position: fixed;
    right: 10px;
    top: 370px; /* 左側ウィジェットと同じY座標 */
    width: 300px;
    height: calc(100vh - 380px); /* 画面下部まで表示 */
    z-index: 900;
    display: none; /* 初期状態は非表示 */
    overflow-y: auto; /* スクロール表示 */
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* より大きい画面のみTOP20を表示 */
@media screen and (min-width: 1400px) {
    #top20-widget-container {
        display: block;
    }
}

/* TOP20固定表示用のスタイル調整 */
.top20-widget-title {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 認証情報スタイル */
.auth-info {
    margin-top: 15px;
    text-align: center;
}

.user-status, .guest-status, .anonymous-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-name {
    font-weight: bold;
    color: #333;
}

.user-role {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.role-anonymous { background: #f8f9fa; color: #495057; }
.role-guest { background: #e9ecef; color: #6c757d; }
.role-member { background: #d4edda; color: #155724; }
.role-premium { background: #fff3cd; color: #856404; }
.role-admin { background: #f8d7da; color: #721c24; }
.role-system { background: #d1ecf1; color: #0c5460; }

.anonymous-label, .guest-label {
    color: #666;
    font-style: italic;
}

.limited-notice {
    background: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: bold;
}

.login-btn, .dashboard-btn, .logout-btn, .upgrade-btn, .info-btn {
    padding: 5px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.upgrade-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.info-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.info-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.dashboard-btn {
    background: #007bff;
    color: white;
}

.dashboard-btn:hover {
    background: #0056b3;
}

.logout-btn {
    background: #dc3545;
    color: white;
}

.logout-btn:hover {
    background: #c82333;
}

/* モバイル表示での認証情報調整 */
@media screen and (max-width: 768px) {
    .user-status, .guest-status, .anonymous-status {
        flex-direction: column;
        gap: 5px;
    }
}

.top20-widget-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 0.8em;
    font-style: italic;
}

.top20-widget-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top20-widget-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.top20-widget-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-left-color: #4CAF50;
}

.top20-widget-item .rank {
    font-weight: bold;
    color: #2196F3;
    min-width: 25px;
    text-align: center;
    font-size: 0.9em;
}

.top20-widget-item .category {
    flex: 1;
    padding: 0 8px;
    color: #333;
    font-weight: 500;
    font-size: 0.85em;
}

.top20-widget-item .percentage {
    color: #2196F3;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
    min-width: 45px;
    text-align: right;
}

/* TOP20固定表示のトップ3特別スタイル */
.top20-widget-item:nth-child(1) .rank {
    color: #FFD700;
    font-size: 1.1em;
}

.top20-widget-item:nth-child(2) .rank {
    color: #C0C0C0;
    font-size: 1.0em;
}

.top20-widget-item:nth-child(3) .rank {
    color: #CD7F32;
    font-size: 0.95em;
} 