/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors from the provided reference images - with enhanced vibrancy */
  --purple-primary: #5E43A9; /* Brighter purple */
  --purple-dark: #352162;
  --emergency-red: #FF4D4A; /* Much brighter red */
  --yellow-primary: #FFD030; /* Brighter, more vibrant yellow */
  --white: #FFFFFF;
  --gray-light: #F5F5F5;
  --gray-dark: #333333;
  --gray-medium: #888888;
  --phone-border: #222222;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #2c2c2c;
  color: var(--gray-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

/* Phone container to mimic a mobile device */
.app-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 0;
}

.phone-container {
  width: 320px;
  height: 640px;
  background-color: var(--phone-border);
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.phone-header {
  height: 30px;
  background-color: var(--phone-border);
  display: flex;
  justify-content: center;
  position: relative;
  overflow: visible; /* Allow notch to overlap */
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 5px 15px 0;
  height: 24px;
  position: relative;
  z-index: 10;
  color: white;
}

.status-bar-time {
  font-size: 12px;
  font-weight: 600;
  position: absolute;
  left: 15px;
}

.status-bar-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  right: 15px;
}

/* Signal Icon */
.signal-icon {
  display: flex;
  align-items: flex-end;
  height: 10px;
  gap: 1px;
}

.signal-bar {
  width: 3px;
  background-color: white;
  border-radius: 1px;
}

.signal-bar:nth-child(1) {
  height: 4px;
}

.signal-bar:nth-child(2) {
  height: 6px;
}

.signal-bar:nth-child(3) {
  height: 8px;
}

.signal-bar:nth-child(4) {
  height: 10px;
}

/* WiFi Icon */
.wifi-icon {
  width: 14px;
  height: 10px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.wifi-arc {
  position: absolute;
  border: 1px solid white;
  border-bottom: none;
  border-radius: 100% 100% 0 0;
}

.wifi-arc:nth-child(1) {
  width: 4px;
  height: 2px;
  bottom: 0;
}

.wifi-arc:nth-child(2) {
  width: 8px;
  height: 5px;
  bottom: 0;
}

.wifi-arc:nth-child(3) {
  width: 12px;
  height: 8px;
  bottom: 0;
}

/* Battery Icon */
.battery-icon {
  width: 20px;
  height: 10px;
  border: 1px solid white;
  border-radius: 2px;
  padding: 1px;
  position: relative;
}

.battery-icon::after {
  content: '';
  position: absolute;
  height: 4px;
  width: 1px;
  background: white;
  right: -2px;
  top: 3px;
}

.battery-level {
  height: 100%;
  width: 70%;
  background-color: white;
  border-radius: 1px;
}

.notch {
  width: 120px;
  height: 25px;
  background-color: var(--phone-border);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  position: absolute;
  top: 0;
  z-index: 5;
}

.phone-content {
  height: 580px;
  background-color: var(--gray-light);
  overflow: hidden;
  position: relative;
}

.phone-footer {
  height: 30px;
  background-color: var(--phone-border);
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-button {
  width: 80px;
  height: 5px;
  background-color: #555;
  border-radius: 3px;
}

/* App Styles */
.app-container {
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 100%;
  background-color: var(--gray-light);
}

.header {
  text-align: center;
  margin-bottom: 25px;
  margin-top: 25px;
}

/* Logo Banner */
.logo-banner {
  background: linear-gradient(to bottom, #5E43A9, #46307B);
  width: 100%;
  padding: 18px;
  margin: 0;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 800;
  overflow: hidden;
  font-size: 0;
  outline: none; /* Remove outline when clicked */
  user-select: none; /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: default; /* Use default cursor instead of text cursor */
}

.logo-banner:focus {
  outline: none; /* Ensure no focus outline appears */
}

.logo-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
}

.logo-wrapper {
  display: inline-block;
  position: relative;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  max-width: 200px;
  margin: 0 auto;
  pointer-events: none; /* Prevent any click interactions */
  user-select: none; /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.logo-img {
  max-width: 100%;
  max-height: 70px;
  height: auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;
  transform: translateZ(0);
  vertical-align: top;
  position: relative;
  z-index: 5;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  pointer-events: none; /* Prevent any click interactions */
  user-select: none; /* Prevent text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: default; /* Use default cursor instead of text cursor */
}

.logo-img:hover {
  transform: scale(1.03);
}

/* For backward compatibility */
.logo-container {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* For backward compatibility */
.logo {
  font-size: 48px;
  font-weight: bold;
  color: var(--purple-primary);
  margin-bottom: 10px;
}

.header h1 {
  font-size: 24px;
  color: var(--purple-primary);
  margin-bottom: 12px;
  padding: 0 15px;
  font-weight: 700; /* Slightly bolder text */
}

/* Hide subtitle in translation page */
.translation-page .subtitle {
  display: none;
}

.subtitle {
  font-size: 15px;
  color: var(--gray-dark);
  margin-bottom: 30px;
  padding: 0 15px;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 0 15px;
  margin-top: 10px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 55px;
  width: 100%;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--white);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Enhanced shadow for depth */
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); /* Text shadow for better contrast */
}

.btn:disabled {
  opacity: 0.8; /* More visible when disabled */
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--purple-primary);
  background-image: linear-gradient(to bottom, #6a4dbf, var(--purple-primary)); /* Stronger gradient */
  border-bottom: 3px solid #4a3387; /* Add border for depth */
}

.btn-emergency {
  background-color: var(--emergency-red);
  background-image: linear-gradient(to bottom, #ff635f, var(--emergency-red)); /* Stronger gradient */
  border-bottom: 3px solid #e13e3b; /* Add border for depth */
}

.btn-translate {
  background-color: var(--yellow-primary);
  background-image: linear-gradient(to bottom, #ffdc5c, var(--yellow-primary)); /* Stronger gradient */
  color: #444;
  font-weight: 700; /* Make text stand out more on yellow */
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5); /* Different text shadow for yellow */
  border-bottom: 3px solid #eab71e; /* Add border for depth */
}

.translate-btn {
  background-color: var(--yellow-primary);
  background-image: linear-gradient(to bottom, #ffdc5c, var(--yellow-primary)); /* Stronger gradient */
  color: #444;
  font-weight: 700;
  margin: 15px 0;
  height: 50px;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5); /* Different text shadow for yellow */
  border-bottom: 3px solid #eab71e; /* Add border for depth */
}

/* Translation Area */
.translation-area {
  width: 100%;
  padding: 0 15px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Back button style */
.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 810;
  width: 26px;
  height: 26px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.back-button svg {
  width: 26px;
  height: 26px;
  fill: var(--white);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

/* Simple Translation Layout */
.translation-page {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.translation-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  padding: 20px 15px;
}

.translation-area h2 {
  text-align: center;
  color: var(--yellow-primary);
  font-size: 24px;
  font-weight: 700;
  margin: 15px 0 30px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Simplified Camera View */
.camera-preview {
  width: 100%;
  height: 240px;
  background-color: #e0e0e0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-weight: 500;
  margin-bottom: 30px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1); /* Inset shadow for depth */
}

.translate-btn-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.translation-result {
  background-color: var(--white);
  padding: 15px;
  border-radius: 10px;
  margin-top: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); /* Enhanced shadow */
}

.translation-result h3 {
  margin-bottom: 10px;
  color: var(--gray-dark);
  font-weight: 600;
}

/* CONTACTS PAGE STYLES */
.contacts-page {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contacts-area {
  padding: 15px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contacts-area h2 {
  text-align: center;
  color: var(--purple-primary);
  font-size: 24px;
  font-weight: 700;
  margin: 15px 0 20px;
}

/* Search bar */
.search-container {
  margin-bottom: 20px;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--white);
  border-radius: 10px;
  padding: 8px 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.search-icon {
  width: 20px;
  height: 20px;
  fill: var(--gray-medium);
  margin-right: 10px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--gray-dark);
}

.search-input::placeholder {
  color: var(--gray-medium);
}

/* Contacts list */
.contacts-list {
  margin-bottom: 20px;
  overflow-y: auto;
  flex: 1;
}

.contact-item {
  display: flex;
  align-items: center;
  background-color: var(--white);
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--purple-primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 15px;
}

.contact-details {
  flex: 1;
}

.contact-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 3px;
}

.contact-info {
  color: var(--gray-medium);
  font-size: 13px;
}

.contact-actions svg {
  width: 22px;
  height: 22px;
  fill: var(--purple-primary);
  cursor: pointer;
}

/* Add contact button */
.add-contact-container {
  margin-top: auto;
  padding: 15px 0;
  display: flex;
  justify-content: center;
}

.add-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--purple-primary);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 12px 25px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(94, 67, 169, 0.4);
  cursor: pointer;
  transition: all 0.2s;
}

.add-contact-btn:hover {
  background-color: #6a4dbf;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(94, 67, 169, 0.5);
}

.add-contact-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--white);
  margin-right: 8px;
}

/* EMERGENCY SERVICES STYLES */
.emergency-page {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.emergency-area {
  padding: 15px;
  height: 100%;
}

.emergency-area h2 {
  text-align: center;
  color: var(--emergency-red);
  font-size: 24px;
  font-weight: 700;
  margin: 15px 0 20px;
}

/* Main emergency call button */
.emergency-call-container {
  margin-bottom: 25px;
}

.emergency-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background-color: var(--emergency-red);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(240, 58, 55, 0.4);
  cursor: pointer;
  transition: all 0.2s;
}

.emergency-call-btn:hover {
  background-color: #ff635f;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(240, 58, 55, 0.5);
}

.emergency-call-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--white);
  margin-right: 10px;
}

/* Emergency service categories */
.emergency-category {
  margin-bottom: 20px;
}

.emergency-category h3 {
  color: var(--gray-dark);
  font-size: 16px;
  margin-bottom: 10px;
  padding-left: 5px;
}

.emergency-item {
  display: flex;
  align-items: center;
  background-color: var(--white);
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.emergency-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.emergency-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.police-icon {
  background-color: #2c80ff;
}

.fire-icon {
  background-color: #ff6b2c;
}

.medical-icon {
  background-color: #1bb978;
}

.emergency-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--white);
}

.emergency-details {
  flex: 1;
}

.emergency-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 3px;
}

.emergency-contact {
  color: var(--gray-medium);
  font-size: 13px;
}

.emergency-action svg {
  width: 22px;
  height: 22px;
  fill: var(--emergency-red);
  cursor: pointer;
}

/* Demo Notice */
.demo-notice {
  margin-top: auto;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: #8c8c8c; /* Slightly darker for better contrast */
  border-top: 1px solid #ddd;
  margin-top: 20px;
}

.version {
  font-size: 10px;
  margin-top: 5px;
}

/* For actual mobile devices - make it fullscreen */
@media (max-width: 500px) {
  .app-wrapper {
    padding: 0;
  }
  
  .phone-container {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }
  
  .phone-header, .phone-footer {
    display: none;
  }
  
  .phone-content {
    height: 100vh;
  }
}

/* Make emergency items clickable */
.video-trigger {
  cursor: pointer;
  transition: transform 0.2s;
}

.video-trigger:hover {
  transform: translateY(-2px);
  background-color: #f9f9f9;
}

/* VIDEO CALL PAGE STYLES */
.video-call-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #000; /* Dark background for video calls */
}

.video-call-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.call-status-bar {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.call-contact-name {
  font-weight: 600;
  font-size: 16px;
}

.call-duration {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* Video placeholder */
.video-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #222;
  overflow: hidden;
  position: relative;
}

.video-placeholder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Call controls */
.call-controls {
  background: rgba(0, 0, 0, 0.7);
  padding: 15px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.call-control-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.call-control-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.mute-btn, .speaker-btn {
  background-color: rgba(255, 255, 255, 0.2);
}

.end-call-btn {
  background-color: #FF4D4A;
}

/* Instruction for video placement */
.video-instruction {
  text-align: center;
  color: #ddd;
  padding: 20px;
  max-width: 90%;
}

.video-instruction p {
  margin-bottom: 10px;
  font-size: 14px;
}

.video-instruction code {
  display: block;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 4px;
  margin-top: 15px;
  font-family: monospace;
  font-size: 12px;
  color: #ffe0a0;
  white-space: nowrap;
  overflow-x: auto;
}

/* Update camera preview for video */
.camera-preview {
  width: 100%;
  height: 240px;
  background-color: #222;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ddd;
  font-weight: 500;
  margin-bottom: 30px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
}

.camera-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
} 