
:root {
  --tzp-bg: #081120;
  --tzp-bg2: #0f172a;
  --tzp-card: rgba(255, 255, 255, 0.08);
  --tzp-card-border: rgba(255, 255, 255, 0.15);
  --tzp-text: #ffffff;
  --tzp-text-soft: #b9c3d5;
  --tzp-primary: #3b82f6;
  --tzp-primary-hover: #2563eb;
  --tzp-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  --tzp-radius: 24px;
  --tzp-blur: 20px;
}

.tzp-app.tzp-light {
  --tzp-bg: #f2f7ff;
  --tzp-bg2: #dbeafe;
  --tzp-card: rgba(255, 255, 255, 0.9);
  --tzp-card-border: rgba(0, 0, 0, 0.08);
  --tzp-text: #0f172a;
  --tzp-text-soft: #475569;
  --tzp-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.tzp-app,
.tzp-app * {
  box-sizing: border-box;
}

.tzp-app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  color: var(--tzp-text);
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--tzp-bg), var(--tzp-bg2));
  overflow: hidden;
  isolation: isolate;
}

.tzp-app .background-blur {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

.tzp-app .blur1 { width: 300px; height: 300px; background: #3b82f6; top: -100px; left: -100px; }
.tzp-app .blur2 { width: 300px; height: 300px; background: #8b5cf6; right: -100px; top: 20%; }
.tzp-app .blur3 { width: 300px; height: 300px; background: #06b6d4; bottom: -120px; left: 35%; }

.tzp-app .app { width: 100%; min-height: 100vh; display: flex; }

.tzp-app .sidebar {
  width: 280px;
  min-height: 100vh;
  position: sticky;
  top: 0;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(var(--tzp-blur));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.tzp-app .logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 40px;
}
.tzp-app .logo-icon {
  width: 60px; height: 60px; border-radius: 18px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex; justify-content: center; align-items: center;
  font-size: 28px; box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}
.tzp-app .logo-text h2 { font-size: 20px; font-weight: 700; margin: 0; }
.tzp-app .logo-text span { font-size: 12px; color: var(--tzp-text-soft); }

.tzp-app .sidebar-menu { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tzp-app .menu-btn {
  width: 100%; border: none; padding: 16px 18px; border-radius: 18px;
  background: transparent; color: var(--tzp-text); display: flex; align-items: center;
  gap: 12px; cursor: pointer; transition: 0.25s ease; font-size: 15px; font-weight: 500;
}
.tzp-app .menu-btn span { font-size: 20px; }
.tzp-app .menu-btn:hover { background: rgba(255, 255, 255, 0.08); transform: translateX(4px); }
.tzp-app .menu-btn.active { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35); }

.tzp-app .sidebar-footer { padding-top: 20px; text-align: center; color: var(--tzp-text-soft); font-size: 13px; }

.tzp-app .main-content {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.tzp-app .topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.tzp-app .header-left h1 { font-size: 34px; font-weight: 700; margin: 0 0 6px; }
.tzp-app .header-left p { color: var(--tzp-text-soft); font-size: 15px; margin: 0; }
.tzp-app .header-right { display: flex; gap: 12px; }

.tzp-app .icon-btn {
  width: 50px; height: 50px; border: none; cursor: pointer; border-radius: 16px;
  font-size: 20px; color: var(--tzp-text); background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px); transition: 0.25s ease;
}
.tzp-app .icon-btn:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.15); }

.tzp-app .live-clock-card,
.tzp-app .converter-card,
.tzp-app .world-clocks-section,
.tzp-app .favorites-section,
.tzp-app .history-section,
.tzp-app .stats-section {
  background: var(--tzp-card);
  backdrop-filter: blur(var(--tzp-blur));
  border: 1px solid var(--tzp-card-border);
  border-radius: var(--tzp-radius);
  box-shadow: var(--tzp-shadow);
}

.tzp-app .live-clock-card {
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tzp-app .clock-left h3 { margin: 0 0 10px; font-size: 16px; color: var(--tzp-text-soft); }
.tzp-app .live-time { font-size: 46px; font-weight: 700; line-height: 1; }
.tzp-app .live-date { margin-top: 10px; color: var(--tzp-text-soft); }
.tzp-app .clock-icon {
  width: 90px; height: 90px; border-radius: 50%;
  display: flex; justify-content: center; align-items: center; font-size: 40px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.tzp-app .section-title { margin-bottom: 20px; }
.tzp-app .section-title h2 { font-size: 22px; font-weight: 600; margin: 0; }
.tzp-app .card-header { margin-bottom: 25px; }
.tzp-app .card-header h2 { font-size: 24px; font-weight: 700; margin: 0; }

.tzp-app .footer { margin-top: auto; }
.tzp-app .footer-content {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  color: var(--tzp-text-soft); font-size: 14px;
}

.tzp-app .empty-state { padding: 30px; text-align: center; color: var(--tzp-text-soft); }

.tzp-app .converter-card { padding: 30px; }
.tzp-app .converter-grid {
  display: grid; grid-template-columns: 1fr 100px 1fr; gap: 25px; align-items: center;
}

.tzp-app .form-group { display: flex; flex-direction: column; gap: 10px; }
.tzp-app .form-group label { font-size: 14px; font-weight: 600; color: var(--tzp-text-soft); }

.tzp-app input[type='datetime-local'],
.tzp-app .search-box,
.tzp-app select,
.tzp-app textarea,
.tzp-admin-wrap input[type='text'],
.tzp-admin-wrap input[type='number'],
.tzp-admin-wrap select,
.tzp-admin-wrap textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--tzp-text);
  font-size: 15px;
  outline: none;
  transition: 0.25s ease;
}

.tzp-app input[type='datetime-local']:focus,
.tzp-app .search-box:focus,
.tzp-admin-wrap input:focus,
.tzp-admin-wrap select:focus,
.tzp-admin-wrap textarea:focus {
  border-color: var(--tzp-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.tzp-app select {
  min-height: 250px; border: none; outline: none; border-radius: 18px;
  background: rgba(255, 255, 255, 0.06); color: var(--tzp-text); padding: 12px; font-size: 14px;
}
.tzp-app select option { padding: 12px; border-radius: 10px; margin-bottom: 2px; color: #111; }
.tzp-app .tzp-light select option { color: #111; }
.tzp-app .tzp-dark select option { color: #fff; }

.tzp-app .swap-container { display: flex; justify-content: center; align-items: center; }
.tzp-app .swap-btn {
  width: 70px; height: 70px; border: none; cursor: pointer; border-radius: 22px;
  color: #fff; font-size: 24px; background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.35); transition: 0.25s ease;
}
.tzp-app .swap-btn:hover { transform: rotate(180deg) scale(1.05); }

.tzp-app .action-buttons { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 25px; }
.tzp-app .primary-btn, .tzp-app .secondary-btn, .tzp-app .favorite-remove {
  border: none; border-radius: 16px; padding: 14px 22px; cursor: pointer;
  font-weight: 600; transition: 0.25s ease;
}
.tzp-app .primary-btn { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
.tzp-app .primary-btn:hover { transform: translateY(-2px); }
.tzp-app .secondary-btn { background: rgba(255, 255, 255, 0.08); color: var(--tzp-text); }
.tzp-app .secondary-btn:hover { background: rgba(255, 255, 255, 0.14); }

.tzp-app .result-container { margin-top: 28px; }
.tzp-app .result-header { margin-bottom: 15px; }
.tzp-app .result-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.tzp-app .result-card {
  padding: 24px; border-radius: 20px; background: rgba(255,255,255,0.06); min-height: 120px;
}
.tzp-app .placeholder { color: var(--tzp-text-soft); text-align: center; padding: 24px 0; }
.tzp-app .result-badge {
  display: inline-flex; padding: 8px 12px; border-radius: 999px; margin: 0 8px 12px 0;
  background: rgba(59, 130, 246, 0.16); color: var(--tzp-text); font-size: 13px; font-weight: 600;
}
.tzp-app .result-sub { color: var(--tzp-text-soft); margin-bottom: 10px; }
.tzp-app .result-main { font-size: 30px; font-weight: 700; margin: 10px 0; }
.tzp-app .mt-20 { margin-top: 20px; }

.tzp-app .world-clocks-section,
.tzp-app .favorites-section,
.tzp-app .history-section,
.tzp-app .stats-section { padding: 30px; }

.tzp-app .world-clock-grid,
.tzp-app .favorites-grid,
.tzp-app .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.tzp-app .world-clock-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tzp-app .world-card,
.tzp-app .favorite-card,
.tzp-app .history-item,
.tzp-admin-note {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 18px;
}

.tzp-app .city { color: var(--tzp-text-soft); margin-bottom: 10px; font-size: 14px; }
.tzp-app .world-time { font-size: 20px; font-weight: 700; }

.tzp-app .favorite-card { display: flex; flex-direction: column; gap: 12px; }
.tzp-app .favorite-zone { font-weight: 700; }
.tzp-app .favorite-time { color: var(--tzp-text-soft); font-size: 14px; }
.tzp-app .favorite-actions button,
.tzp-app .favorite-remove {
  align-self: flex-start;
  background: rgba(239, 68, 68, 0.16);
  color: var(--tzp-text);
}

.tzp-app .history-list { display: flex; flex-direction: column; gap: 12px; }
.tzp-app .history-item { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.tzp-app .history-route { font-weight: 700; margin-bottom: 8px; }
.tzp-app .history-date { color: var(--tzp-text-soft); font-size: 13px; }
.tzp-app .history-result { font-weight: 600; text-align: right; }

.tzp-app .stat-card {
  padding: 18px; border-radius: 20px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
}
.tzp-app .stat-card h4 { margin: 0 0 10px; color: var(--tzp-text-soft); font-size: 14px; }
.tzp-app .stat-value { font-size: 32px; font-weight: 800; }

.tzp-app .toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  opacity: 0; pointer-events: none; z-index: 99999;
  background: rgba(15, 23, 42, 0.95); color: #fff; padding: 14px 18px;
  border-radius: 16px; box-shadow: var(--tzp-shadow); transition: 0.25s ease;
}
.tzp-app.tzp-light .toast { background: rgba(15, 23, 42, 0.95); color: #fff; }
.tzp-app .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.tzp-app .loader-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 17, 32, 0.5); backdrop-filter: blur(8px); z-index: 9999; transition: 0.25s ease;
}
.tzp-app.tzp-light .loader-overlay { background: rgba(242, 247, 255, 0.5); }
.tzp-app .loader { text-align: center; padding: 30px; }
.tzp-app .spinner {
  width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.2);
  border-top-color: #fff; margin: 0 auto 14px; animation: tzp-spin 0.8s linear infinite;
}
.tzp-app.tzp-light .spinner { border-top-color: #3b82f6; }
@keyframes tzp-spin { to { transform: rotate(360deg); } }

.tzp-app .hidden { display: none !important; }

.tzp-admin-wrap {
  max-width: 1100px;
}
.tzp-admin-wrap .form-table th {
  width: 240px;
}
.tzp-admin-wrap .form-table td {
  vertical-align: top;
}
.tzp-admin-wrap .description {
  color: #64748b;
}
.tzp-admin-note {
  margin-top: 20px;
}
.tzp-admin-wrap select, .tzp-admin-wrap input, .tzp-admin-wrap textarea {
  max-width: 100%;
}

@media (max-width: 1100px) {
  .tzp-app .converter-grid { grid-template-columns: 1fr; }
  .tzp-app .swap-container { margin: 10px 0; }
  .tzp-app .world-clock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .tzp-app .app { flex-direction: column; }
  .tzp-app .sidebar { width: 100%; min-height: auto; position: relative; }
  .tzp-app .topbar,
  .tzp-app .live-clock-card,
  .tzp-app .footer-content,
  .tzp-app .history-item { flex-direction: column; align-items: flex-start; }
  .tzp-app .world-clock-grid,
  .tzp-app .favorites-grid,
  .tzp-app .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .tzp-app .main-content { padding: 18px; }
  .tzp-app .header-left h1 { font-size: 28px; }
  .tzp-app .live-time { font-size: 36px; }
  .tzp-app .world-clock-grid { grid-template-columns: 1fr; }
  .tzp-app .action-buttons { flex-direction: column; }
  .tzp-app .primary-btn, .tzp-app .secondary-btn { width: 100%; }
}
