/* ===== Page Layout ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page-container {
  display: flex;
  align-items: center;
  gap: 60px;
}

/* ===== Sidebar Buttons ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar button {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid #000;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.sidebar button:hover {
  background: #000;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar button:active {
  transform: translateY(0);
}

#resetBtn {
  border-color: #999;
  color: #999;
  font-size: 14px;
  padding: 10px 24px;
  margin-top: 8px;
}

#resetBtn:hover {
  background: #999;
  color: #fff;
  border-color: #999;
}

/* ===== iPhone Frame ===== */
.iphone-frame {
  width: 393px;
  height: 852px;
  background: #1a1a1a;
  border-radius: 55px;
  padding: 11px;
  position: relative;
  box-shadow:
    inset 0 0 0 1px #333,
    0 0 0 2px #2a2a2a,
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 8px 20px rgba(0, 0, 0, 0.2);
}

.iphone-inner {
  width: 100%;
  height: 100%;
  border-radius: 45px;
  overflow: hidden;
  position: relative;
  background: #000;
}

/* ===== Dynamic Island ===== */
.dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 37px;
  background: #000;
  border-radius: 20px;
  z-index: 200;
}

/* ===== Status Bar ===== */
.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 28px 8px;
  z-index: 150;
  pointer-events: none;
}

.status-time {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.battery-icon {
  display: flex;
  align-items: center;
}

.battery-body {
  width: 24px;
  height: 11px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  padding: 1px;
}

.battery-fill {
  width: 75%;
  height: 100%;
  background: #fff;
  border-radius: 1px;
}

.battery-tip {
  width: 2px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0 1px 1px 0;
  margin-left: 1px;
}

/* ===== Screens ===== */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

/* ===== Lock Screen ===== */
#lockScreen {
  background: linear-gradient(160deg, #0a0a2e 0%, #1a1a3e 30%, #0f2847 60%, #162950 100%);
  color: #fff;
}

.lock-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 160px;
}

.lock-time {
  font-size: 82px;
  font-weight: 300;
  letter-spacing: 1px;
  line-height: 1;
}

.lock-date {
  font-size: 17px;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 6px;
}

/* ===== Notification ===== */
.notification {
  position: absolute;
  top: 60px;
  left: 16px;
  right: 16px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.notification:hover {
  background: rgba(255, 255, 255, 0.18);
}

.notification.hidden {
  opacity: 0;
  transform: translateY(-30px) scale(0.95);
  pointer-events: none;
}

.notif-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.notif-icon {
  width: 22px;
  height: 22px;
  background: #ee0000;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-app {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  opacity: 0.9;
}

.notif-time {
  font-size: 12px;
  opacity: 0.5;
  margin-left: auto;
}

.notif-subject {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.notif-body {
  font-size: 14px;
  line-height: 1.35;
  opacity: 0.85;
}

/* Lock screen footer */
.lock-footer {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.home-indicator {
  width: 134px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

/* ===== Unlock Animation ===== */
#lockScreen.unlocking {
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  transform: scale(0.9);
  opacity: 0;
}

/* ===== App Screen: Verizon Header ===== */
#appScreen {
  background: #f6f6f6;
}

.vz-header {
  background: linear-gradient(135deg, #ee0000 0%, #cc0000 100%);
  padding: 58px 16px 14px;
  flex-shrink: 0;
}

.vz-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vz-logo {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.vz-header-icons {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* ===== App Content Area ===== */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

/* ===== Chat View (Demo 1) ===== */
.chat-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-view.hidden {
  display: none;
}

.chat-header-bar {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.chat-agent-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  background: #fce4e4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-agent-name {
  font-size: 14px;
  font-weight: 600;
  color: #000;
}

.chat-agent-status {
  font-size: 12px;
  color: #4caf50;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f6f6f6;
}

.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  animation: msgAppear 0.3s ease;
}

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

.msg.ai {
  align-self: flex-start;
  background: #fff;
  color: #1a1a1a;
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.msg.user {
  align-self: flex-end;
  background: #ee0000;
  color: #fff;
  border-bottom-right-radius: 6px;
}

/* Option Tiles */
.option-tiles {
  display: flex;
  gap: 10px;
  animation: msgAppear 0.3s ease;
}

.option-tile {
  flex: 1;
  background: #fff;
  border-radius: 14px;
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8e8e8;
}

.option-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.option-tile:active {
  transform: scale(0.97);
}

.tile-image {
  width: 56px;
  height: 56px;
  background: #fce4e4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.tile-text {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
  flex: 1;
}

.tile-learn-more {
  font-size: 11px;
  color: #ee0000;
  font-weight: 600;
  margin-top: 10px;
}

/* Typing Indicator */
.typing-indicator {
  align-self: flex-start;
  background: #fff;
  padding: 12px 18px;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  display: flex;
  gap: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.typing-indicator span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #bbb;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Chat Input */
.chat-input-bar {
  display: flex;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #e8e8e8;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.chat-input-bar input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  background: #f6f6f6;
  transition: border-color 0.2s;
}

.chat-input-bar input:focus {
  border-color: #ee0000;
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ee0000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.chat-send-btn:hover {
  background: #cc0000;
}

/* ===== Contract View (Demo 2) ===== */
.contract-view {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.contract-view.hidden {
  display: none;
}

.contract-header {
  background: #fff;
  padding: 20px 16px 16px;
  border-bottom: 1px solid #e8e8e8;
}

.contract-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  margin-bottom: 4px;
}

.contract-subtitle {
  font-size: 14px;
  color: #666;
}

.contract-body {
  padding: 16px;
  background: #fff;
  margin: 0;
}

.contract-effective {
  font-size: 13px;
  color: #555;
  margin-bottom: 6px;
}

.contract-body h3 {
  font-size: 14px;
  font-weight: 700;
  color: #000;
  margin-top: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.contract-body p {
  font-size: 13px;
  line-height: 1.65;
  color: #333;
  margin-bottom: 10px;
}

.contract-body ul {
  margin: 8px 0 12px 20px;
  font-size: 13px;
  line-height: 1.65;
  color: #333;
}

.contract-body ul li {
  margin-bottom: 4px;
}

.contract-body strong {
  color: #000;
}

.contract-signature {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #e8e8e8;
}

.contract-signature p:first-child {
  font-size: 14px;
  margin-bottom: 10px;
}

.contract-accept-area {
  text-align: center;
  margin-top: 20px;
  padding-bottom: 20px;
}

.accept-btn {
  background: #ee0000;
  color: #fff;
  border: none;
  padding: 14px 48px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
}

.accept-btn:hover {
  background: #cc0000;
}

.accept-btn:active {
  transform: scale(0.97);
}

.accept-btn.accepted {
  background: #4caf50;
  pointer-events: none;
}

.accept-note {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

/* ===== Bottom Navigation ===== */
.vz-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0 24px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.vz-bottom-nav .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 8px;
}

.vz-bottom-nav .tab.active {
  color: #ee0000;
}

.vz-bottom-nav .tab span {
  font-weight: 500;
}

/* ===== Scrollbar styling inside iPhone ===== */
.app-content::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.contract-view::-webkit-scrollbar {
  width: 0px;
}
