mari / style.css
sirochild's picture
Upload 2 files
09b166c verified
raw
history blame
11.5 kB
/* ========================
全体レイアウト
======================== */
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
/* Gradio 5.0のコンテナスタイル */
.gradio-container {
max-width: 1200px !important;
margin: 0 auto !important;
position: relative !important;
z-index: 1 !important;
}
/* Gradio 5.0のブロックスタイル - 完全に透明に */
.gradio-container > div > div {
background-color: transparent !important;
border-radius: 12px !important;
margin-bottom: 16px !important;
padding: 16px !important;
box-shadow: none !important;
}
/* ========================
背景画像設定
======================== */
/* 背景画像コンテナ - 常に表示されるように */
.background-container {
position: fixed !important;
top: 0 !important;
left: 0 !important;
width: 100% !important;
height: 100% !important;
z-index: -1000 !important; /* 最背面に配置 */
pointer-events: none !important;
overflow: hidden !important;
}
/* 背景画像 */
.chat-background {
position: absolute !important;
top: 0 !important;
left: 0 !important;
width: 100% !important;
height: 100% !important;
background-size: cover !important;
background-position: center !important;
opacity: 0.3 !important; /* 適度な透明度 */
filter: blur(1px) !important; /* 少しぼかす */
transition: all 0.5s ease !important; /* 背景切り替え時のアニメーション */
}
/* 背景画像の上に半透明のオーバーレイを追加 */
.background-container::after {
content: "" !important;
position: absolute !important;
top: 0 !important;
left: 0 !important;
width: 100% !important;
height: 100% !important;
background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4)) !important;
z-index: -999 !important;
}
/* ========================
コンポーネント共通スタイル
======================== */
/* グループ共通スタイル - 背景を透明に */
.header-box, .chat-box, .input-box, .status-box, .footer-box {
background-color: transparent !important;
border-radius: 12px !important;
box-shadow: none !important;
padding: 15px !important;
margin-bottom: 15px !important;
border: none !important;
}
/* ========================
ヘッダー
======================== */
.header-box {
text-align: center !important;
}
.header-box h1 {
margin: 0 !important;
padding: 10px !important;
color: #333 !important;
}
/* ========================
チャットUI
======================== */
/* チャットコンテナ */
.chat-box {
padding: 15px !important;
margin-bottom: 15px !important;
}
/* チャットエリア */
#chat_area {
min-height: 400px !important;
max-height: 500px !important;
overflow-y: auto !important;
padding: 10px !important;
background-color: transparent !important;
}
/* チャットメッセージ */
.message {
background-color: rgba(255, 255, 255, 0.7) !important;
border-radius: 8px !important;
padding: 10px !important;
margin-bottom: 8px !important;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}
/* ========================
入力欄
======================== */
.input-box {
padding: 10px !important;
}
/* 入力欄のスタイル - より目立つように */
textarea, input[type="text"], input[type="number"], .gradio-textbox {
background-color: rgba(255, 255, 255, 0.95) !important;
border-radius: 8px !important;
border: 2px solid rgba(255, 100, 100, 0.5) !important;
padding: 12px !important;
font-size: 16px !important;
color: #333 !important;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
backdrop-filter: blur(5px) !important;
-webkit-backdrop-filter: blur(5px) !important;
margin-bottom: 10px !important;
min-height: 50px !important;
width: 100% !important;
display: block !important;
box-sizing: border-box !important;
}
/* 入力欄のコンテナ */
.gradio-textbox {
background-color: rgba(255, 255, 255, 0.8) !important;
padding: 10px !important;
border-radius: 10px !important;
margin-bottom: 15px !important;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}
/* 入力欄のフォーカス時のスタイル */
textarea:focus, input[type="text"]:focus, input[type="number"]:focus {
border-color: rgba(255, 50, 50, 0.8) !important;
box-shadow: 0 0 8px rgba(255, 100, 100, 0.5) !important;
outline: none !important;
}
/* ボタンのスタイル - より目立つように */
button, .submit, button[type="submit"], .gradio-button {
background-color: rgba(255, 100, 100, 0.9) !important;
color: white !important;
border-radius: 8px !important;
border: 1px solid rgba(200, 0, 0, 0.2) !important;
padding: 10px 20px !important;
font-weight: bold !important;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
margin: 5px !important;
height: auto !important;
min-height: 40px !important;
transition: all 0.2s ease !important;
opacity: 1 !important;
visibility: visible !important;
display: block !important;
width: auto !important;
min-width: 100px !important;
font-size: 16px !important;
cursor: pointer !important;
z-index: 1000 !important;
position: relative !important;
}
button:hover, .submit:hover, button[type="submit"]:hover, .gradio-button:hover {
background-color: rgba(255, 50, 50, 1.0) !important;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
transform: translateY(-2px) !important;
}
/* 送信ボタン特有のスタイル */
.submit, button[type="submit"] {
background-color: #ff4757 !important;
font-size: 18px !important;
padding: 12px 24px !important;
margin-top: 10px !important;
margin-bottom: 10px !important;
width: 100% !important;
max-width: 200px !important;
}
/* ========================
ステータス表示
======================== */
.status-box {
padding: 15px !important;
background-color: rgba(255, 255, 255, 0.9) !important;
border-radius: 12px !important;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
margin-bottom: 15px !important;
}
/* スライダー(好感度バー)のスタイル */
.status-box input[type="range"], .gradio-slider input[type="range"] {
-webkit-appearance: none !important;
appearance: none !important;
width: 100% !important;
height: 20px !important;
border-radius: 10px !important;
background: linear-gradient(to right, #ff6b6b, #ff9e9e) !important;
outline: none !important;
opacity: 1 !important;
transition: opacity 0.2s !important;
margin: 15px 0 !important;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
border: 2px solid rgba(255, 255, 255, 0.5) !important;
}
.status-box input[type="range"]::-webkit-slider-thumb, .gradio-slider input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none !important;
appearance: none !important;
width: 30px !important;
height: 30px !important;
border-radius: 50% !important;
background: #ff4757 !important;
cursor: pointer !important;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.3) !important;
border: 2px solid white !important;
}
/* スライダーのコンテナ */
.gradio-slider {
background-color: rgba(255, 255, 255, 0.8) !important;
padding: 15px !important;
border-radius: 10px !important;
margin-bottom: 15px !important;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}
/* ラベルのスタイル */
.status-box label {
font-weight: bold !important;
color: #333 !important;
margin-bottom: 5px !important;
display: block !important;
}
/* ========================
フッター
======================== */
.footer-box {
text-align: center !important;
padding: 10px !important;
margin-top: 20px !important;
}
/* ========================
テーマ別背景画像
======================== */
.default {
background-image: url("https://cdn.pixabay.com/photo/2017/03/28/12/11/chairs-2181960_1280.jpg");
}
.room_night {
background-image: url("https://cdn.pixabay.com/photo/2017/08/01/01/33/beige-2562468_1280.jpg");
}
.beach_sunset {
background-image: url("https://cdn.pixabay.com/photo/2016/11/29/04/19/ocean-1867285_1280.jpg");
}
.festival_night {
background-image: url("https://cdn.pixabay.com/photo/2015/11/22/19/04/crowd-1056764_1280.jpg");
}
.shrine_day {
background-image: url("https://cdn.pixabay.com/photo/2019/07/14/10/48/japan-4337223_1280.jpg");
}
.cafe_afternoon {
background-image: url("https://cdn.pixabay.com/photo/2016/11/18/14/05/brick-wall-1834784_1280.jpg");
}
.aquarium_night {
background-image: url("https://cdn.pixabay.com/photo/2017/06/20/20/45/fish-2424369_1280.jpg");
}
/* 以下は元々あったクラス定義 */
.aquarium_day {
background-image: url("https://cdn.pixabay.com/photo/2016/11/29/02/02/aquarium-1867283_1280.jpg");
}
.forest_day {
background-image: url("https://cdn.pixabay.com/photo/2015/11/19/18/36/forest-1054795_1280.jpg");
}
.forest_night {
background-image: url("https://cdn.pixabay.com/photo/2017/10/31/18/47/fog-2900424_1280.jpg");
}
/* ========================
チャットエリアなど(必要に応じて)
======================== */
.gradio-container {
position: relative !important; /* 背景をabsoluteで置くために */
overflow: hidden !important;
}
/* Gradio 5.0の特定のクラスに対するスタイル */
.gradio-row {
display: flex !important;
flex-wrap: wrap !important;
margin: 0 -10px !important;
}
.gradio-column {
padding: 0 10px !important;
box-sizing: border-box !important;
}
/* 入力エリアのコンテナ */
.input-container, .gradio-textbox-input {
background-color: rgba(255, 255, 255, 0.8) !important;
border-radius: 10px !important;
padding: 15px !important;
margin-bottom: 15px !important;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}
/* 送信ボタンのコンテナ */
.submit-container {
display: flex !important;
justify-content: center !important;
margin-top: 10px !important;
}
.chatbot {
background-color: rgba(255, 255, 255, 0.7) !important;
border-radius: 12px !important;
padding: 15px !important;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
margin-bottom: 20px !important;
min-height: 400px !important;
max-height: 600px !important;
overflow-y: auto !important;
}
/* チャットメッセージのスタイル */
.chatbot > div > div > div {
background-color: rgba(255, 255, 255, 0.9) !important;
border-radius: 12px !important;
padding: 12px !important;
margin-bottom: 12px !important;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
font-size: 16px !important;
line-height: 1.5 !important;
}
/* ユーザーメッセージ */
.chatbot > div > div:nth-child(odd) > div {
background-color: rgba(230, 230, 255, 0.95) !important;
border-left: 4px solid #6c5ce7 !important;
}
/* ボットメッセージ */
.chatbot > div > div:nth-child(even) > div {
background-color: rgba(255, 230, 230, 0.95) !important;
border-left: 4px solid #ff6b6b !important;
}