* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 125%;
}
body {
  background-color: #000;
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}

.tempmail-panel {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #000;
}

.tm-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #000;
  z-index: 100;
}

.tm-close-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-family: 'JetBrains Mono', Courier, monospace;
  font-size: 0.75rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  border: none;
  background: none;
  cursor: pointer;
}

.tm-close-btn:hover {
  opacity: 1;
}

.tm-title {
  font-family: 'JetBrains Mono', Courier, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.tm-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.tm-sidebar {
  width: 380px;
  border-right: 1px solid #333;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background-color: #050505;
}

.tm-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tm-card-header {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: #888;
}

.tm-address-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #333;
  padding: 1rem;
  background-color: #000;
  border-radius: 4px;
}

.tm-address {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tm-icon-btn {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.tm-icon-btn:hover {
  color: #fff;
  transform: translateY(-1px);
}

.tm-actions {
  display: flex;
}

.tm-btn {
  background-color: #fff;
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  width: 100%;
  border-radius: 2px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.tm-btn:hover {
  background-color: #e0e0e0;
}

.tm-status {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tm-status-indicator {
  width: 8px;
  height: 8px;
  background-color: #4CAF50;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

.tm-status-text {
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.05em;
}

.tm-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: #000;
}

.tm-inbox {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tm-inbox-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: #fff;
}

.tm-badge {
  background-color: #333;
  color: #fff;
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
}

.tm-message-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.tm-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #444;
  gap: 1.5rem;
}

.tm-empty-state p {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.tm-message-item {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #222;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.tm-message-item:hover {
  background-color: #0a0a0a;
}

.tm-message-item.unread {
  background-color: #111;
  border-left: 2px solid #fff;
}

.tm-msg-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.tm-msg-sender {
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
}

.tm-msg-date {
  font-size: 0.7rem;
  color: #666;
}

.tm-msg-subject {
  font-size: 1rem;
  color: #e0e0e0;
  margin-bottom: 0.25rem;
}

.tm-msg-snippet {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Detail View */
.tm-detail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.tm-detail-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #333;
}

.tm-back-to-inbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: #888;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.3s ease;
}

.tm-back-to-inbox:hover {
  color: #fff;
}

.tm-message-meta {
  padding: 2rem;
  border-bottom: 1px solid #222;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tm-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.tm-meta-label {
  width: 80px;
  font-size: 0.7rem;
  color: #666;
  letter-spacing: 0.1em;
  padding-top: 0.1rem;
}

.tm-meta-value {
  font-size: 0.9rem;
  color: #e0e0e0;
}

.tm-message-body {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ccc;
}

/* Email body (HTML content) */
.tm-email-body {
  color: #ccc;
  line-height: 1.6;
  word-break: break-word;
}

.tm-email-body a {
  color: #6ea8fe;
  text-decoration: underline;
}

.tm-email-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0.5rem 0;
}

.tm-email-body pre,
.tm-email-body code {
  background: #111;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
}

.tm-email-body blockquote {
  border-left: 3px solid #333;
  padding-left: 1rem;
  color: #888;
  margin: 0.5rem 0;
}

.tm-email-body table {
  border-collapse: collapse;
  max-width: 100%;
}

.tm-email-body td,
.tm-email-body th {
  border: 1px solid #333;
  padding: 0.4rem 0.8rem;
  font-size: 0.85em;
}

@media (max-width: 768px) {
  .tm-content {
    flex-direction: column;
  }
  
  .tm-sidebar {
    width: 100%;
    padding: 1.5rem;
    gap: 1.5rem;
    border-right: none;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
  }
  
  .tm-header {
    padding: 0 1rem;
  }
  
  .tm-inbox-header, .tm-message-item, .tm-detail-header, .tm-message-meta, .tm-message-body {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
