@charset "utf-8";
/* 自訂模組 */
@import url(_style_login.css);
/* 賽局大師 - 主要樣式 */
:root {
   --primary-color: #2563eb;
   --secondary-color: #1e40af;
   --success-color: #16a34a;
   --danger-color: #dc2626;
   --dark-bg: #1e293b;
   --dark-card: #334155;
   --light-bg: #f8fafc;
   --light-card: #ffffff;
}

body {
   font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
   transition: background-color 0.3s ease;
}

/* 亮色主題 */
body.light-theme {
   background-color: var(--light-bg);
   color: #1e293b;
   & .hero-section {background-image: url('../img/hero-bg-light.png');}
   /* Theme Toggle */
   & .theme-toggle {
   color:black;
   }
   & .theme-toggle:hover {
      border: 1px solid rgba(255, 0, 51, 0.8);
      color: rgba(255, 196, 81, 1);
   }
}

/* 暗色主題 */
body.dark-theme {
   background-color: var(--dark-bg);
   color: #f1f5f9;
   & .hero-section {background-image: url('../img/hero-bg-dark.png');}
   /* Theme Toggle */
   & .theme-toggle {
   color:white;
   }
   & .theme-toggle:hover {
      border: 1px solid rgba(0, 255, 204, 0.8);
      color: rgba(128, 175, 221, 1);
   }
}

/* Hero Section */
.hero-section {
   min-height: 600px;
   background-size: cover;
   background-position: center;
   position: relative;
   display: flex;
   align-items: center;
   justify-content: center;
}

.hero-overlay {
   position: absolute;
   inset: 0;
   background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.4), rgba(30,41,59,0.8));
}

.hero-content {
   position: relative;
   z-index: 10;
   text-align: center;
   color: white;
}

.hero-logo {
   height: 96px;
   margin-bottom: 2rem;
}

.hero-title {
   font-size: 3.5rem;
   font-weight: bold;
   margin-bottom: 1.5rem;
   text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
   font-size: 1.5rem;
   margin-bottom: 1rem;
   text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-description {
   font-size: 1.125rem;
   margin-bottom: 2.5rem;
   max-width: 700px;
   margin-left: auto;
   margin-right: auto;
   text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Cards */
.feature-card {
   border: 2px solid #e2e8f0;
   border-radius: 0.5rem;
   padding: 1.5rem;
   transition: all 0.3s ease;
   height: 100%;
}

.feature-card:hover {
   box-shadow: 0 10px 25px rgba(0,0,0,0.1);
   transform: translateY(-5px);
}

.dark-theme .feature-card {
   background-color: var(--dark-card);
   border-color: #475569;
}

.feature-icon {
   width: 48px;
   height: 48px;
   margin-bottom: 1rem;
   color: var(--primary-color);
}

/* Chat Interface */
.chat-container {
   display: flex;
   height: 100vh;
}

.chat-sidebar {
   width: 320px;
   border-right: 1px solid #e2e8f0;
   display: flex;
   flex-direction: column;
}

.dark-theme .chat-sidebar {
   border-right-color: #475569;
   background-color: var(--dark-card);
}

.chat-main {
   flex: 1;
   display: flex;
   flex-direction: column;
}

.chat-messages {
   flex: 1;
   overflow-y: auto;
   padding: 2rem;
}

.message-bubble {
   max-width: 80%;
   padding: 1rem;
   border-radius: 0.5rem;
   margin-bottom: 1rem;
}

.message-user {
   background-color: var(--primary-color);
   color: white;
   margin-left: auto;
}

.message-assistant {
   background-color: #f1f5f9;
   color: #1e293b;
}

.dark-theme .message-assistant {
   background-color: var(--dark-card);
   color: #f1f5f9;
}

.loading-indicator {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   padding: 1rem;
   background-color: #f1f5f9;
   border-radius: 0.5rem;
   max-width: 80%;
}

.dark-theme .loading-indicator {
   background-color: var(--dark-card);
}

.loading-spinner {
   width: 20px;
   height: 20px;
   border: 3px solid var(--primary-color);
   border-top-color: transparent;
   border-radius: 50%;
   animation: spin 1s linear infinite;
}

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

.completed-indicator {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   padding: 0.75rem 1rem;
   background-color: rgba(22, 163, 74, 0.1);
   border: 1px solid rgba(22, 163, 74, 0.5);
   border-radius: 0.5rem;
   color: var(--success-color);
   margin: 1rem auto;
   max-width: fit-content;
}

/* Conversation List */
.conversation-item {
   padding: 0.75rem;
   border-radius: 0.5rem;
   cursor: pointer;
   transition: background-color 0.2s ease;
   margin-bottom: 0.5rem;
}

.conversation-item:hover {
   background-color: #f1f5f9;
}

.dark-theme .conversation-item:hover {
   background-color: #475569;
}

.conversation-item.active {
   background-color: #dbeafe;
}

.dark-theme .conversation-item.active {
   background-color: #1e40af;
}

/* Buttons */
.btn-primary {
   background-color: var(--primary-color);
   border-color: var(--primary-color);
   color: white;
}

.btn-primary:hover {
   background-color: var(--secondary-color);
   border-color: var(--secondary-color);
}

/* Theme Toggle */
.theme-toggle {
   cursor: pointer;
   padding: 0.5rem;
   border-radius: 0.375rem;
   transition: all 0.2s ease;
}

.theme-toggle:hover {
   background-color: rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
   .hero-title {
      font-size: 2.5rem;
   }
   
   .hero-subtitle {
      font-size: 1.25rem;
   }
   
   .chat-sidebar {
      width: 100%;
      max-width: 320px;
   }
   
   .message-bubble {
      max-width: 90%;
   }
}

/* Scrollbar */
::-webkit-scrollbar {
   width: 8px;
}

::-webkit-scrollbar-track {
   background: #f1f5f9;
}

.dark-theme ::-webkit-scrollbar-track {
   background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
   background: #cbd5e1;
   border-radius: 4px;
}

.dark-theme ::-webkit-scrollbar-thumb {
   background: #475569;
}

::-webkit-scrollbar-thumb:hover {
   background: #94a3b8;
}
