/* ナビゲーションメニュー */
.main-nav {
    background-color: #fff;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.1);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-nav li {
    margin: 0 1rem;
}

.main-nav a {
    color: #5f6368;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #1a73e8;
}

.main-nav a.active {
    color: #1a73e8;
    font-weight: 500;
}

.main-nav a.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1a73e8;
}

/* 基本スタイル */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #202124;
    background-color: #fff;
}

.container {
    max-width: 584px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 期間限定バナー */
.limited-offer-banner {
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #5f6368;
    padding: 8px 0;
    background-color: #f8f9fa;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.limited-offer-banner a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
}

.limited-offer-banner a:hover {
    background-color: #f1f3f4;
    text-decoration: none;
}

/* 検索コンテナ */
.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    flex: 1;
    justify-content: center;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 584px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    outline: none;
    box-shadow: none;
}

.search-box input:focus {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: rgba(223, 225, 229, 0);
}

/* サジェストドロップダウン */
.suggestion-dropdown {
    position: absolute;
    width: 100%;
    background: white;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 6px rgba(32, 33, 36, 0.2);
    z-index: 10;
    margin-top: -1px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dfe1e5;
    border-top: none;
}

.flat-suggestions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.flat-suggestions li {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.1s ease;
}

.flat-suggestions li:hover {
    background-color: #f1f3f4;
}

.flat-suggestions li.selected {
    background-color: #f1f3f4;
}

.item-info {
    flex: 1;
}

.item-info span {
    font-weight: normal;
    color: #202124;
}

.item-info small {
    display: block;
    color: #70757a;
    font-size: 13px;
    margin-top: 2px;
}

/* アクションボタン */
.copy-btn, .link-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin: 0 4px;
    color: #1a73e8;
    background: none;
    border: none;
}

.copy-btn.copied {
    color: #34a853;
}

.copy-btn:hover, .link-btn:hover {
    background-color: rgba(26, 115, 232, 0.1);
}

/* 検索ボタン */
.buttons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 584px;
}

/* このサイトについてリンク（右下） */
.about-link-fixed {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.about-link-fixed a {
    color: #5f6368;
    font-size: 0.8rem;
    text-decoration: none;
}

.about-link-fixed a:hover {
    text-decoration: underline;
}

/* PR表記（左上） */
.pr-link-fixed {
    position: absolute;
    top: 5px;
    left: 10px;
}

.pr-link-fixed span {
    color: #5f6368;
    font-size: 0.8rem;
}

.buttons button {
    background-color: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    font-size: 14px;
    padding: 0 16px;
    height: 36px;
    cursor: pointer;
    min-width: 120px;
}

.buttons button:hover {
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
    border: 1px solid #dadce0;
}

/* 検索結果テーブル */

/* 検索結果 */
.search-results {
    margin-top: 10px;
    width: 100%;
    max-width: 580px;
    align-self: center;
    overflow-x: auto;
}

.search-results h2 {
    font-size: 0.9rem;
    font-weight: normal;
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(32, 33, 36, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: #f8f9fa;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e4e8;
}

th {
    font-weight: 500;
    color: #5f6368;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* 名前とコピーボタンのレイアウト */
.name-with-copy {
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-button {
    background-color: #f8f9fa;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #1a73e8;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background-color: #f1f3f4;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.action-cell {
    display: flex;
    justify-content: flex-end;
}

.copy-btn {
    color: #1a73e8;
    background: none;
    border: none;
}

.link-btn {
    color: #1a73e8;
    background: none;
    border: none;
}

/* トースト通知 */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #323232;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast-notification[x-show] {
    opacity: 1;
}

.toast-notification::before {
    content: '✓';
    display: inline-block;
    font-weight: bold;
    margin-right: 6px;
}

@keyframes toast-in-out {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    10% { opacity: 1; transform: translate(-50%, 0); }
    90% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Aboutページのスタイル */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.about-section {
    margin-bottom: 30px;
}

.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #1a73e8;
}

.about-section h3 {
    font-size: 1.2rem;
    margin: 15px 0 10px;
    color: #202124;
}

.about-section p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #5f6368;
}

.back-link {
    margin-bottom: 20px;
}

.back-link a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.back-link a:hover {
    text-decoration: underline;
}

.about-footer {
    text-align: center;
    padding: 20px 0;
    color: #5f6368;
    font-size: 0.8rem;
}

/* フッターリンク */
.footer-links {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    color: #5f6368;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.footer-links:hover {
    opacity: 1;
}

.footer-links a {
    color: #5f6368;
    text-decoration: none;
    margin-left: 10px;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #1a73e8;
}

/* PRポップアップスタイル - 完全に書き直し */
#pr-link {
    position: fixed;
    top: 10px;
    left: 10px;
    color: #666;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    cursor: pointer;
}

#pr-popup {
    display: none;
    position: absolute;
    top: 30px;
    left: 0;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    min-width: 200px;
    max-width: 300px;
    font-size: 0.9em;
}

/* PC用のホバー動作 */
@media (min-width: 769px) {
    #pr-link:hover #pr-popup {
        display: block;
    }
}

.pr-popup .affiliate-link {
    display: block;
    margin: 5px 0;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.pr-popup .affiliate-link:hover {
    background: #f0f0f0;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    #pr-link {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1000;
    }
    
    #pr-popup.active {
        display: block;
    }
    
    .container {
        padding: 1rem;
    }
    
    .search-box {
        margin: 1rem 0;
    }
    
    .search-results {
        margin: 1rem 0;
    }
    
    .search-results ul {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        position: static;
        text-align: center;
        margin-top: 20px;
        padding: 10px 0;
    }
}
