@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f8f6f0 0%, #f1ede4 100%);
    min-height: 100vh;
    color: #2c2c2c;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 8px 0 24px 0;
    border-bottom: 1px solid rgba(139, 108, 77, 0.2);
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 12px;
    color: #8b6c4d;
    letter-spacing: 0.02em;
    text-shadow: none;
}

header p {
    font-size: 1.2rem;
    color: #6b6b6b;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.gacha-area {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(198, 167, 108, 0.2);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 10px;
    box-shadow: 0 8px 32px rgba(198, 167, 108, 0.15);
}

.result-card {
    background: linear-gradient(135deg, rgba(198, 167, 108, 0.1) 0%, rgba(198, 167, 108, 0.05) 100%);
    border: 1px solid rgba(198, 167, 108, 0.3);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
    transform: scale(1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
}

.result-card.show {
    animation: resultAppear 0.6s ease-out;
}

.hidden {
    display: none;
}

.restaurant-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #c6a76c;
    letter-spacing: 0.01em;
}

.price-range {
    font-size: 1rem;
    color: #9a9a9a;
    margin-bottom: 16px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.menu-item {
    font-size: 1.1rem;
    font-weight: 400;
    color: #4a4a4a;
    margin-bottom: 16px;
    line-height: 1.6;
    word-wrap: break-word;
    letter-spacing: 0.01em;
}

.estimated-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #c6a76c;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.gacha-controls {
    text-align: center;
}

.restaurant-selector {
    margin-bottom: 30px;
    text-align: left;
}

.restaurant-selector h2 {
    font-family: 'Playfair Display', serif;
    color: #c6a76c;
    margin-bottom: 24px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.restaurant-selector h3 {
    font-family: 'Playfair Display', serif;
    color: #c6a76c;
    margin-bottom: 24px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.category-tab {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(198, 167, 108, 0.3);
    border-radius: 24px;
    padding: 10px 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    color: #4a4a4a;
    font-weight: 400;
    letter-spacing: 0.01em;
    backdrop-filter: blur(10px);
}

.category-tab:hover {
    background: rgba(198, 167, 108, 0.1);
    border-color: rgba(198, 167, 108, 0.5);
    transform: translateY(-1px);
}

.category-tab.active {
    background: linear-gradient(135deg, #c6a76c 0%, #b8996b 100%);
    color: #ffffff;
    border-color: #c6a76c;
    box-shadow: 0 4px 16px rgba(198, 167, 108, 0.3);
}

.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    max-height: 320px;
    overflow-y: auto;
    padding: 16px;
    border: 1px solid rgba(198, 167, 108, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.restaurant-grid::-webkit-scrollbar {
    width: 6px;
}

.restaurant-grid::-webkit-scrollbar-track {
    background: rgba(198, 167, 108, 0.1);
    border-radius: 3px;
}

.restaurant-grid::-webkit-scrollbar-thumb {
    background: rgba(198, 167, 108, 0.3);
    border-radius: 3px;
}

.restaurant-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(198, 167, 108, 0.2);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    font-size: 0.85rem;
    color: #4a4a4a;
    backdrop-filter: blur(5px);
}

.restaurant-item:hover {
    border-color: rgba(198, 167, 108, 0.5);
    background: rgba(198, 167, 108, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 167, 108, 0.15);
}

.restaurant-item.selected {
    border-color: #c6a76c;
    background: linear-gradient(135deg, rgba(198, 167, 108, 0.2) 0%, rgba(198, 167, 108, 0.1) 100%);
    color: #c6a76c;
    box-shadow: 0 4px 16px rgba(198, 167, 108, 0.25);
}

.restaurant-item .category {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 3px;
}

.restaurant-item .name {
    font-weight: bold;
    margin-bottom: 5px;
}

.restaurant-item .price-range {
    font-size: 0.9rem;
    opacity: 0.8;
}

.select-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.select-button {
    background: rgba(255, 255, 255, 0.7);
    color: #4a4a4a;
    border: 1px solid rgba(198, 167, 108, 0.3);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.select-button:hover {
    background: rgba(198, 167, 108, 0.15);
    border-color: rgba(198, 167, 108, 0.5);
    transform: translateY(-1px);
}

.price-filter {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-filter label {
    font-weight: 500;
    color: #c6a76c;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.01em;
}

.price-filter input[type="range"] {
    flex: 1;
    margin: 0 20px;
    height: 4px;
    border-radius: 2px;
    background: rgba(198, 167, 108, 0.2);
    outline: none;
    appearance: none;
}

.price-filter input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c6a76c 0%, #b8996b 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(198, 167, 108, 0.4);
    transition: all 0.3s ease;
}

.price-filter input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(198, 167, 108, 0.6);
}

.price-filter span {
    min-width: 80px;
    font-weight: 500;
    color: #c6a76c;
    font-family: 'Playfair Display', serif;
}

.main-dish-filter {
    margin-bottom: 20px;
    text-align: center;
}

.main-dish-filter label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 400;
    color: #4a4a4a;
    cursor: pointer;
    letter-spacing: 0.01em;
}

.main-dish-filter input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    border: 2px solid rgba(198, 167, 108, 0.5);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    position: relative;
}

.main-dish-filter input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #c6a76c 0%, #b8996b 100%);
    border-color: #c6a76c;
}

.main-dish-filter input[type="checkbox"]:checked::before {
    content: '✓';
    position: absolute;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gacha-button {
    background: linear-gradient(135deg, #c6a76c 0%, #b8996b 100%);
    color: #ffffff;
    border: 2px solid #c6a76c;
    border-radius: 6px;
    padding: 16px 48px;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 32px rgba(198, 167, 108, 0.25);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    display: block;
    margin: 0 auto;
}

.gacha-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.gacha-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(198, 167, 108, 0.4);
    border-color: #d4b876;
}

.gacha-button:hover::before {
    left: 100%;
}

.gacha-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(198, 167, 108, 0.3);
}

.gacha-button:disabled {
    opacity: 0.5;
    pointer-events: none;
    transform: none;
}

.history {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(198, 167, 108, 0.2);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(198, 167, 108, 0.15);
}

.history h2 {
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin-bottom: 24px;
    color: #c6a76c;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.history h3 {
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin-bottom: 24px;
    color: #c6a76c;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(198, 167, 108, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 3px solid #c6a76c;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(198, 167, 108, 0.4);
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-item .restaurant {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    color: #c6a76c;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.history-item .menu {
    color: #4a4a4a;
    margin-bottom: 8px;
    font-weight: 400;
}

.history-item .timestamp {
    font-size: 0.85rem;
    color: #9a9a9a;
    font-weight: 300;
}

.sns-share-buttons {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(198, 167, 108, 0.3);
    text-align: center;
}

.sns-share-buttons h3 {
    font-family: 'Playfair Display', serif;
    color: #c6a76c;
    margin-bottom: 16px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.share-button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-button {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(198, 167, 108, 0.3);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: #4a4a4a;
    text-decoration: none;
    display: inline-block;
    min-width: 80px;
    backdrop-filter: blur(10px);
    letter-spacing: 0.01em;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 167, 108, 0.2);
}

.twitter-share {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

.twitter-share:hover {
    background: #333333;
    border-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.line-share {
    background: #00c300;
    border-color: #00c300;
    color: #ffffff;
}

.line-share:hover {
    background: #00a000;
    border-color: #00a000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 195, 0, 0.3);
}

.copy-share:hover {
    background: rgba(198, 167, 108, 0.2);
    border-color: #c6a76c;
    color: #c6a76c;
}

.copy-success {
    background: rgba(40, 167, 69, 0.2) !important;
    border-color: #28a745 !important;
    color: #28a745 !important;
}

/* アフィリエイト広告 */
.header-ad {
    text-align: center;
    margin: 10px 0 20px 0;
    padding: 0;
}

/* デフォルト状態：PC広告を表示、モバイル広告を非表示 */
.header-ad .ad-pc {
    display: block;
}


.header-ad img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}


/* メインコンテンツレイアウト */
.main-content {
    width: 100%;
}

.content-area {
    width: 100%;
}

/* 中間広告 */
.middle-ad {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px 0;
    padding: 0;
    text-align: center;
}

.middle-ad a {
    display: block;
    text-align: center;
    margin: 0 auto;
}

.middle-ad img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}




@keyframes resultAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    header {
        margin-bottom: 40px;
        padding: 24px 0;
    }

    header h1 {
        font-size: 2.5rem;
    }

    header p {
        font-size: 1rem;
    }

    .gacha-area {
        padding: 20px;
        margin-bottom: 24px;
    }

    .restaurant-selector {
        margin-bottom: 16px;
    }

    .restaurant-selector h2 {
        margin-bottom: 16px;
        font-size: 1.1rem;
    }

    .restaurant-selector h3 {
        margin-bottom: 16px;
        font-size: 1.1rem;
    }

    .category-tabs {
        margin-bottom: 16px;
        gap: 6px;
    }

    .category-tab {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .result-card {
        padding: 24px;
    }

    .restaurant-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
        max-height: 200px;
        padding: 12px;
    }

    .restaurant-item {
        padding: 6px;
        font-size: 0.85rem;
    }

    .select-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }

    .select-button {
        width: 120px;
    }

    .price-filter {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }

    .price-filter input[type="range"] {
        margin: 10px 0;
        width: 80%;
    }

    .share-button-group {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .share-button {
        width: auto;
        min-width: 70px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* モバイル広告調整 */
    .header-ad {
        display: none;
    }


}