:root {
  --primary-color: #1a73e8;
  --primary-hover: #1557b0;
  --danger-color: #ea4335;
  --bg-color: #f8f9fa;
  --surface-color: #ffffff;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --border-color: #dadce0;
  --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.3),
    0 1px 3px 1px rgba(60, 64, 67, 0.15);
  --radius-md: 8px;
  --radius-lg: 16px;
}

body {
  font-family: "Google Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  margin: 0;
  padding: 40px 20px;
  line-height: 1.6;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background-color: var(--surface-color);
  padding: 48px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px);
}

.app-description {
  text-align: center;
  margin-bottom: 60px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.app-description > p {
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto 40px auto;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  text-align: left;
}

.use-case-card {
  background: var(--bg-color);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}

.use-case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: var(--border-color);
}

.use-case-card h3 {
  font-size: 1.1rem;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.use-case-card p {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

.footer {
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.status {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
}

.status.disconnected {
  background-color: #eee;
  color: #666;
}

.status.connected {
  background-color: #e6f4ea;
  color: #1e8e3e;
}

.status.error {
  background-color: #fce8e6;
  color: #d93025;
}

.auth-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: #f1f3f4;
  border-radius: 8px;
}

.hidden {
  display: none !important;
}

.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

#video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #333;
  color: #fff;
  font-size: 1.2rem;
  z-index: 1;
}

#video-placeholder.hidden {
  display: none;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.btn.danger {
  background-color: var(--danger-color);
}

.chat-input {
  display: flex;
  gap: 0.5rem;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 1rem;
  max-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.message {
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  max-width: 80%;
  word-wrap: break-word;
}

.message.user {
  align-self: flex-end;
  background-color: var(--primary-color);
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.message.gemini {
  align-self: flex-start;
  background-color: #e9ecef;
  color: var(--text-color);
  border-bottom-left-radius: 0.25rem;
}

input[type="text"] {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.note {
  font-size: 0.8rem;
  color: #666;
}

.session-end-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}

.link-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.link-btn:hover {
  background-color: #e8f0fe;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grid Layout for App Section */
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
}

.right-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
}

.chat-log {
  flex-grow: 1;
  max-height: 400px;
}

/* Homepage specific styles */
header h1 {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0d47a1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-section h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
}

#status-active {
  font-size: 1rem;
}

/* Enhance button styling */
.btn {
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: var(--surface-color);
  padding: 2rem;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover {
  color: var(--text-primary);
}

/* Form Styles */
.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="tel"],
.modal-content textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.modal-content input:focus,
.modal-content textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.modal-content textarea {
  resize: vertical;
  min-height: 80px;
}

/* Star Rating */
.rating-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.star-rating {
  display: flex;
  gap: 0.5rem;
  font-size: 2rem;
}

.star {
  cursor: pointer;
  color: #ddd;
  transition: color 0.2s;
}

.star:hover,
.star.active {
  color: #ffc107;
}

/* Form Message */
.form-message {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  text-align: center;
}

.form-message.success {
  background-color: #e6f4ea;
  color: #1e8e3e;
}

.form-message.error {
  background-color: #fce8e6;
  color: #d93025;
}

/* Link Button Enhancement */
.link-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

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