:root {
  --wa-bg: #efe7dd;
  --wa-light-green: #dcf8c6;
  --wa-header: #075e54;
  --wa-text: #303030;
  --wa-muted: #8696a0;
  --wa-blue: #007aff;
  --iphone-frame: #1f1f1f;
  --iphone-radius: 48px;
  --screen-radius: 36px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: #0a0a0a;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: white;
}

.simulator-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* iPhone Frame */
.iphone-frame {
  width: 320px;
  height: 650px;
  background: var(--iphone-frame);
  border-radius: var(--iphone-radius);
  padding: 12px;
  position: relative;
  box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.iphone-frame::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--iphone-radius);
  box-shadow: inset 0 0 0 6px #333;
  pointer-events: none;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  background: var(--wa-bg);
  border-radius: var(--screen-radius);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Status Bar */
.status-bar {
  height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  font-size: 13px;
  font-weight: 600;
  color: black;
  z-index: 10;
}

.dynamic-island {
  width: 80px;
  height: 24px;
  background: black;
  border-radius: 20px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.indicators {
  display: flex;
  gap: 6px;
  font-size: 14px;
}

/* WhatsApp Header */
.whatsapp-header {
  background: #f6f6f6;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--wa-blue);
}

.wa-avatar {
  width: 34px;
  height: 34px;
  background: #054d44;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

.wa-info {
  display: flex;
  flex-direction: column;
}

.wa-name {
  font-size: 15px;
  font-weight: 600;
  color: black;
}

.wa-status {
  font-size: 10px;
  color: var(--wa-muted);
}

.header-right {
  display: flex;
  gap: 16px;
  color: var(--wa-blue);
  font-size: 18px;
}

/* Chat Body */
.chat-body {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  background: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
}

.date-badge {
  align-self: center;
  background: rgba(225, 245, 254, 0.7);
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.bubble {
  max-width: 80%;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  color: #000;
  animation: slideIn 0.3s ease-out forwards;
}

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

.bubble.incoming {
  align-self: flex-start;
  background: white;
  border-top-left-radius: 0;
}

.bubble.outgoing {
  align-self: flex-end;
  background: var(--wa-light-green);
  border-top-right-radius: 0;
}

.b-time {
  font-size: 10px;
  color: var(--wa-muted);
  display: block;
  text-align: right;
  margin-top: 2px;
}

/* Typing Indicator */
.typing-container {
  padding: 4px 12px;
  font-size: 12px;
  color: var(--wa-muted);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Input Bar */
.input-bar {
  background: #f6f6f6;
  padding: 10px 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mode containers */
.lock-screen, .chat-mode {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Lock Screen */
.lock-screen {
  background: linear-gradient(to bottom, #1e1e1e, #000);
  background-size: cover;
  padding: 60px 24px 100px;
}

.lock-header {
  text-align: center;
  margin-bottom: 40px;
}

.lock-date {
  font-size: 20px;
  font-weight: 500;
  color: white;
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.notif-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  padding: 12px 14px;
  border-radius: 20px;
  display: flex;
  gap: 12px;
  animation: slideInNotif 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInNotif {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.n-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
}

.n-icon.wa { background: #25D366; }
.n-icon.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.n-icon.tt { background: #000; border: 1px solid rgba(255, 255, 255, 0.2); }

.n-body { flex: 1; }
.n-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.n-app { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; }
.n-time { font-size: 11px; opacity: 0.6; }
.n-msg strong { display: block; font-size: 14px; margin-bottom: 1px; }
.n-msg p { font-size: 13px; opacity: 0.9; margin: 0; }

.lock-footer {
  display: flex;
  justify-content: space-between;
  font-size: 24px;
  color: white;
}

.lock-footer i {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-bar i {
  color: var(--wa-blue);
  font-size: 22px;
}

.input-field {
  flex: 1;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  height: 34px;
  border-radius: 17px;
}

/* Automation Overlay */
.automation-overlay {
  position: absolute;
  top: 48px; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 100;
  backdrop-filter: blur(5px);
  color: white;
  animation: fadeIn 0.4s ease-out;
}

.automation-overlay.active { display: flex; }

.gear-spinner {
  font-size: 48px;
  color: #30D158;
  animation: spin 2s linear infinite;
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.home-bar {
  width: 120px;
  height: 5px;
  background: white;
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
  opacity: 0.8;
}

/* Controls */
.controls {
  display: flex;
  gap: 16px;
}

.btn-glow {
  background: #30D158;
  color: black;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(48, 209, 88, 0.3);
  transition: transform 0.2s;
}

.btn-glow:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(48, 209, 88, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
}
