/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-primary: #0F1419;
  --bg-secondary: #1A202C;
  --bg-card: rgba(42, 48, 63, 0.6);
  --bg-glass: rgba(42, 48, 63, 0.4);
  --text-primary: #FFFFFF;
  --text-secondary: #E0E0E0;
  --accent-green: #4CAF50;
  --accent-blue: #4299E1;
  --accent-purple: #9333EA;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
  
  /* Responsive spacing */
  --spacing-xs: clamp(0.5rem, 1vw, 0.75rem);
  --spacing-sm: clamp(0.75rem, 1.5vw, 1rem);
  --spacing-md: clamp(1rem, 2vw, 1.5rem);
  --spacing-lg: clamp(1.5rem, 3vw, 2.5rem);
  --spacing-xl: clamp(2rem, 4vw, 3.5rem);
  
  /* Responsive font sizes */
  --font-xs: clamp(0.75rem, 1.5vw, 0.875rem);
  --font-sm: clamp(0.875rem, 2vw, 1rem);
  --font-base: clamp(1rem, 2.5vw, 1.125rem);
  --font-lg: clamp(1.125rem, 3vw, 1.25rem);
  --font-xl: clamp(1.25rem, 3.5vw, 1.5rem);
  --font-2xl: clamp(1.5rem, 4vw, 2rem);
  --font-3xl: clamp(2rem, 5vw, 2.5rem);
  --font-4xl: clamp(2.5rem, 6vw, 3rem);
  --font-5xl: clamp(3rem, 8vw, 5rem);
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0F1419 0%, #1A202C 50%, #0F1419 100%);
  background-attachment: fixed;
  color: var(--text-secondary);
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 2.5rem) clamp(0.75rem, 2vw, 1.25rem);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Prevent overflow for media elements */
img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6,
p, span, a, li, label, button {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Ensure form elements don't overflow */
input,
select,
textarea,
button {
  max-width: 100%;
  box-sizing: border-box;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(66, 153, 225, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(76, 175, 80, 0.08) 0%, transparent 50%);
  animation: backgroundShift 20s ease infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes backgroundShift {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-20px, -20px) scale(1.1);
    opacity: 0.8;
  }
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 clamp(0.5rem, 2vw, 1rem);
}

/* Header */
.header {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: clamp(2rem, 5vw, 3.125rem);
  animation: fadeInDown 0.8s ease-out;
}

.header-left {
  flex: 1;
}

.version-btn {
  padding: 8px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(147, 51, 234, 0.3);
  border-radius: 10px;
  color: var(--accent-purple);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.2);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.version-btn:hover {
  background: rgba(147, 51, 234, 0.1);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.title {
  font-size: var(--font-5xl);
  font-weight: 800;
  background: linear-gradient(135deg, #FFFFFF 0%, #E0E0E0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
  letter-spacing: -1px;
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
  animation: titleGlow 3s ease-in-out infinite;
  line-height: 1.1;
  word-wrap: break-word;
}

@keyframes titleGlow {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

.subtitle {
  font-size: var(--font-base);
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.85;
  animation: fadeIn 1s ease-out 0.2s both;
  line-height: 1.5;
  word-wrap: break-word;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(0.75rem, 2vw, 0.9375rem);
  flex-wrap: wrap;
  width: 100%;
}

.about-link {
  padding: 10px 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-link:hover {
  background: rgba(147, 51, 234, 0.1);
  border-color: var(--accent-purple);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.version-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #7C3AED 100%);
  color: var(--text-primary);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 0.625rem);
  padding: clamp(0.75rem, 2vw, 0.75rem) clamp(1rem, 3vw, 1.25rem);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: float 3s ease-in-out infinite;
  width: 100%;
  flex-wrap: wrap;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.status-indicator:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: rgba(76, 175, 80, 0.3);
}

.status-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

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

.status-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.status-subtext {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Settings Toggle Button */
.settings-toggle-wrapper {
  margin-bottom: 30px;
  display: flex;
  justify-content: flex-start;
}

.settings-toggle-btn {
  padding: 12px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-toggle-btn:hover {
  background: rgba(147, 51, 234, 0.1);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.settings-toggle-btn .settings-icon {
  color: inherit;
  stroke: currentColor;
  animation: rotateIcon 20s linear infinite;
}

.settings-toggle-btn:hover .settings-icon {
  animation-duration: 2s;
}

/* Display Settings */
.display-settings {
  margin-bottom: clamp(2rem, 5vw, 3.125rem);
  padding: clamp(1.25rem, 3vw, 1.875rem);
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  display: none;
  animation: slideDown 0.3s ease-out;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.display-settings.active {
  display: block;
}

.display-settings:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(147, 51, 234, 0.3);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.settings-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.settings-icon-small {
  color: var(--accent-purple);
  stroke: var(--accent-purple);
  flex-shrink: 0;
}

.settings-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  padding: 0;
  margin-left: auto;
}

.settings-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #EF4444;
  transform: rotate(90deg) scale(1.1);
}

@keyframes rotateIcon {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Time Converter Section */
.time-converter-section {
  margin-bottom: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.converter-mode-toggle {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
  flex-wrap: wrap;
  width: 100%;
}

.mode-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.mode-label.active {
  color: var(--accent-purple);
  opacity: 1;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 3px;
  background-color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #7C3AED 100%);
  border-color: var(--accent-purple);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(30px);
  background-color: var(--text-primary);
}

.toggle-switch:hover .toggle-slider {
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.1);
}

.converter-card {
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-xl);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.converter-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

.converter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 40px rgba(147, 51, 234, 0.2);
  border-color: rgba(147, 51, 234, 0.3);
}

.converter-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: clamp(1.25rem, 3vw, 1.875rem);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.converter-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.converter-input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.time-input,
.date-input {
  background: rgba(26, 32, 44, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.time-input:focus,
.date-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2), var(--shadow-md);
  transform: translateY(-2px);
}

.timezone-select {
  background: rgba(26, 32, 44, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23E0E0E0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.timezone-select:hover {
  border-color: rgba(147, 51, 234, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.timezone-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2);
}

.convert-btn {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #7C3AED 100%);
  color: var(--text-primary);
  border: none;
  border-radius: 12px;
  padding: 12px 32px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.3);
  align-self: flex-end;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.convert-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.convert-btn:hover::before {
  width: 300px;
  height: 300px;
}

.convert-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.4);
}

.convert-btn:active {
  transform: translateY(-1px) scale(1.02);
}

.converter-results {
  position: relative;
  z-index: 2;
}

.result-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  opacity: 0.6;
  font-size: 0.9rem;
}

.converter-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 2.5vw, 1.25rem);
}

.converter-result-card {
  background: rgba(26, 32, 44, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.converter-result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(147, 51, 234, 0.3);
}

.result-timezone {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.result-time {
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  margin-bottom: clamp(0.5rem, 1vw, 0.5rem);
  line-height: 1;
  font-family: 'Inter', sans-serif;
  letter-spacing: clamp(-1px, -0.3vw, -2px);
  word-break: break-word;
}

.result-date {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.85;
  margin-bottom: 12px;
}

.result-location {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-location-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #7C3AED 100%);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.6);
}

.local-result {
  border-color: rgba(76, 175, 80, 0.4) !important;
  background: rgba(76, 175, 80, 0.05) !important;
}

.local-result .result-timezone {
  color: var(--accent-green) !important;
}

.local-result .result-location-dot {
  background: linear-gradient(135deg, var(--accent-green) 0%, #45a049 100%);
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.6);
}

.client-result {
  border-color: rgba(147, 51, 234, 0.4) !important;
  background: rgba(147, 51, 234, 0.05) !important;
}

.client-result .result-timezone {
  color: var(--accent-purple) !important;
}

.client-result .result-location-dot {
  background: linear-gradient(135deg, var(--accent-purple) 0%, #7C3AED 100%);
  box-shadow: 0 0 12px rgba(147, 51, 234, 0.6);
}

.section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  opacity: 0.9;
}

.section-description {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-bottom: 24px;
}

.settings-controls {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.dropdown {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23E0E0E0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  min-width: 220px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.dropdown:hover {
  border-color: rgba(66, 153, 225, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dropdown:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

/* Main Content */
.main-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 1.875rem);
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Section Headers */
.section-header {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 1.125rem);
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

/* Local Time Section */
.local-time-section {
  display: flex;
  flex-direction: column;
}

.local-time-card {
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  position: relative;
  box-shadow: var(--shadow-xl);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
  width: 100%;
  box-sizing: border-box;
}

.local-time-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(66, 153, 225, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.local-time-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(66, 153, 225, 0.2);
  border-color: rgba(66, 153, 225, 0.3);
}

.timezone-tag {
  background: linear-gradient(135deg, var(--accent-green) 0%, #45a049 100%);
  color: #0F1419;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.timezone-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.time-display {
  font-size: clamp(2.5rem, 12vw, 5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  margin: clamp(1rem, 3vw, 1.875rem) 0 clamp(0.5rem, 1.5vw, 0.9375rem) 0;
  line-height: 1;
  font-family: 'Inter', sans-serif;
  letter-spacing: clamp(-2px, -0.5vw, -3px);
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 2;
  animation: timeGlow 2s ease-in-out infinite;
  word-break: break-word;
}

@keyframes timeGlow {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.1);
  }
}

.date-display {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.85;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.status-info {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.sync-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  opacity: 0.85;
  font-weight: 500;
}

.sync-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

.format-indicator {
  font-size: 0.875rem;
  color: var(--text-secondary);
  opacity: 0.85;
  font-weight: 500;
}

/* World Clocks Section */
.world-clocks-section {
  display: flex;
  flex-direction: column;
}

.add-clock-btn {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #3182CE 100%);
  color: var(--text-primary);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(66, 153, 225, 0.3);
  position: relative;
  overflow: hidden;
}

.add-clock-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.add-clock-btn:hover::before {
  width: 300px;
  height: 300px;
}

.add-clock-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(66, 153, 225, 0.4);
}

.add-clock-btn:active {
  transform: translateY(-1px) scale(1.02);
}

.add-icon {
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.add-clock-btn span:last-child {
  position: relative;
  z-index: 1;
}

.world-clocks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 1.5rem);
}

.clock-card {
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: clamp(1rem, 3vw, 1.5rem);
  position: relative;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.clock-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(66, 153, 225, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.clock-card:hover::before {
  opacity: 1;
}

.clock-card:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(2deg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(66, 153, 225, 0.2);
  border-color: rgba(66, 153, 225, 0.3);
}

.clock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}

.clock-location {
  display: flex;
  align-items: center;
  gap: 10px;
}

.location-dot {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--accent-blue) 0%, #3182CE 100%);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(66, 153, 225, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

.location-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.pinned-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
  font-weight: 500;
}

.clock-time {
  font-size: clamp(1.75rem, 7vw, 2.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  margin-bottom: clamp(0.5rem, 1.5vw, 0.625rem);
  line-height: 1;
  font-family: 'Inter', sans-serif;
  letter-spacing: clamp(-1px, -0.3vw, -2px);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  word-break: break-word;
}

.clock-card:hover .clock-time {
  transform: scale(1.05);
}

.clock-date {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.85;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.clock-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.clock-utc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.7;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.remove-clock-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  opacity: 0.6;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
}

.remove-clock-btn:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  transform: rotate(90deg) scale(1.1);
  color: #EF4444;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

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

.modal {
  background: var(--bg-glass);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 90%;
  max-width: min(550px, 95vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  margin: clamp(1rem, 3vw, 2rem);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9) rotateX(10deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  padding: 0;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #EF4444;
  transform: rotate(90deg) scale(1.1);
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
}

.clock-search-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(26, 32, 44, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  margin-bottom: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.clock-search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2), var(--shadow-md);
  transform: translateY(-2px);
}

.clock-search-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.clock-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.clock-option {
  padding: 16px 20px;
  background: rgba(26, 32, 44, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.clock-option:hover {
  background: rgba(66, 153, 225, 0.15);
  border-color: var(--accent-blue);
  transform: translateX(8px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.clock-option-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.clock-option-timezone {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced Card Animations */
.clock-card {
  animation: cardFadeIn 0.6s ease-out both;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.local-time-card {
  animation: localCardFadeIn 0.8s ease-out both;
}

@keyframes localCardFadeIn {
  from {
    opacity: 0;
    transform: translateX(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Smooth transitions for time updates */
.clock-time,
.time-display {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hover effects */
.dropdown,
.clock-search-input,
.clock-option {
  position: relative;
  overflow: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 32, 44, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(66, 153, 225, 0.3);
  border-radius: 10px;
  border: 2px solid rgba(26, 32, 44, 0.5);
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(66, 153, 225, 0.5);
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ============================================ */

/* Base styles are mobile-first (above) */

/* Small devices (landscape phones, 480px and up) */
@media (min-width: 480px) {
  .header-right {
    flex-direction: row;
    align-items: center;
  }
  
  .status-indicator {
    width: auto;
  }
  
  .converter-inputs {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  body {
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.25rem);
  }
  
  .header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .header-left {
    flex: 1;
  }
  
  .header-right {
    flex-direction: row;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 0.9375rem);
    flex-wrap: nowrap;
  }
  
  .status-indicator {
    width: auto;
  }
  
  .section-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .converter-mode-toggle {
    width: auto;
  }
  
  .world-clocks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .converter-inputs {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .converter-result-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .settings-controls {
    flex-direction: row;
    gap: clamp(1.25rem, 3vw, 1.875rem);
  }
  
  .add-clock-btn {
    width: auto;
  }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 4vw, 1.875rem);
  }
  
  .world-clocks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .converter-result-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Extra large devices (large desktops, 1440px and up) */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }
  
  .world-clocks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Prevent horizontal scroll on all devices */
@media (max-width: 1920px) {
  html,
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
  
  .container,
  .about-container {
    overflow-x: hidden;
    width: 100%;
  }
  
  /* Ensure all cards and sections don't overflow */
  section,
  .converter-card,
  .local-time-card,
  .clock-card,
  .modal,
  .display-settings,
  .version-details,
  .developer-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
  * {
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Reduce animations on low-end devices */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
  body {
    padding: clamp(0.75rem, 2vw, 1rem) clamp(0.75rem, 2vw, 1.25rem);
  }
  
  .header {
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
  }
  
  .time-display {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
  
  .clock-time {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .clock-card:hover,
  .local-time-card:hover,
  .converter-card:hover {
    transform: none;
  }
  
  .clock-card:active,
  .local-time-card:active,
  .converter-card:active {
    transform: scale(0.98);
  }
  
  button,
  .about-link,
  .social-link,
  .back-link,
  .convert-btn,
  .add-clock-btn,
  .settings-toggle-btn,
  .modal-close,
  .settings-close-btn,
  .remove-clock-btn {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  
  input,
  select,
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .status-dot,
  .sync-dot,
  .location-dot {
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.8);
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .header-right,
  .settings-toggle-wrapper,
  .add-clock-btn,
  .convert-btn,
  .footer {
    display: none;
  }
}

/* Footer */
.footer {
  margin-top: clamp(2rem, 5vw, 3.75rem);
  padding: clamp(1.25rem, 3vw, 1.875rem) clamp(1rem, 2vw, 1.25rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.copyright {
  color: var(--text-secondary);
  opacity: 0.8;
  font-size: var(--font-sm);
  margin-bottom: clamp(0.5rem, 1.5vw, 0.625rem);
  line-height: 1.5;
  word-wrap: break-word;
}

.developer-link {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  word-break: break-word;
}

.developer-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.footer-links {
  color: var(--text-secondary);
  opacity: 0.6;
  font-size: var(--font-xs);
  line-height: 1.6;
  word-wrap: break-word;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  margin: 0 clamp(0.25rem, 1vw, 0.5rem);
}

.footer-links a:hover {
  color: var(--accent-purple);
  opacity: 1;
}

/* Footer responsive adjustments */
@media (max-width: 480px) {
  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-links a {
    margin: 0;
  }
}