@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* WordPress-safe container and reset */
.japan-time-container {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: auto;
  margin: 0 auto;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  line-height: 1.6;
}

.japan-time-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 182, 193, 0.1) 0%, rgba(255, 105, 180, 0.1) 50%, rgba(138, 43, 226, 0.1) 100%);
  pointer-events: none;
}

.japan-time-container * {
  box-sizing: border-box;
}

/* Header Styles */
.japan-time-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

.japan-time-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin: 0 0 10px 0;
  background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: japan-time-gradient-shift 4s ease-in-out infinite;
}

.japan-time-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0;
  font-weight: 300;
}

@keyframes japan-time-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Main Clock Display */
.japan-time-main-clock {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 30px;
  flex-wrap: wrap;
}

.japan-time-digital-display {
  flex: 1;
  min-width: 300px;
}

.japan-time-current-time {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 600;
  font-family: 'Inter', monospace;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.japan-time-current-date {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 5px;
}

.japan-time-era-date {
  font-size: 1rem;
  opacity: 0.7;
  font-style: italic;
}

/* Analog Clock */
.japan-time-analog-clock {
  width: 200px;
  height: 200px;
  position: relative;
  flex-shrink: 0;
}

.japan-time-clock-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.3);
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.japan-time-hour-markers {
  position: absolute;
  width: 100%;
  height: 100%;
}

.japan-time-marker {
  position: absolute;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 14px;
}

.japan-time-marker-12 { top: 10px; left: 50%; transform: translateX(-50%); }
.japan-time-marker-3 { right: 10px; top: 50%; transform: translateY(-50%); }
.japan-time-marker-6 { bottom: 10px; left: 50%; transform: translateX(-50%); }
.japan-time-marker-9 { left: 10px; top: 50%; transform: translateY(-50%); }

.japan-time-hour-hand, .japan-time-minute-hand, .japan-time-second-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: bottom center;
  border-radius: 2px;
}

.japan-time-hour-hand {
  width: 4px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  margin-left: -2px;
}

.japan-time-minute-hand {
  width: 3px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  margin-left: -1.5px;
}

.japan-time-second-hand {
  width: 1px;
  height: 50px;
  background: #ff6b6b;
  margin-left: -0.5px;
}

.japan-time-center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #ff6b6b;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

/* Controls */
.japan-time-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.japan-time-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.japan-time-btn-primary {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
}

.japan-time-btn-secondary {
  background: linear-gradient(45deg, #48dbfb, #0abde3);
  color: white;
}

.japan-time-btn-accent {
  background: linear-gradient(45deg, #ff9ff3, #f368e0);
  color: white;
}

.japan-time-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Section Titles */
.japan-time-section-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 20px 0;
  text-align: center;
  opacity: 0.95;
}

/* Time Comparison */
.japan-time-comparison {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.japan-time-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.japan-time-comparison-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.japan-time-location {
  font-weight: 500;
  opacity: 0.9;
}

.japan-time-local-time, .japan-time-difference {
  font-family: 'Inter', monospace;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Cities Grid */
.japan-time-cities {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.japan-time-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.japan-time-city-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.japan-time-city-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
}

.japan-time-city-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
  opacity: 0.95;
}

.japan-time-city-time {
  font-family: 'Inter', monospace;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.japan-time-city-status {
  font-size: 0.9rem;
  opacity: 0.7;
  padding: 4px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  display: inline-block;
}

/* Business Status */
.japan-time-business {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.japan-time-business-indicator {
  text-align: center;
}

.japan-time-business-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.japan-time-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  animation: japan-time-pulse 2s infinite;
}

.japan-time-status-dot.open {
  background: #2ed573;
}

.japan-time-status-dot.closed {
  background: #ff4757;
}

@keyframes japan-time-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.japan-time-business-hours {
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Sun Times */
.japan-time-sun-times {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.japan-time-sun-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.japan-time-sun-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.japan-time-sun-label {
  font-weight: 500;
}

.japan-time-sun-time {
  font-family: 'Inter', monospace;
  font-weight: 600;
}

/* Calendar Info */
.japan-time-calendar {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.japan-time-calendar-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.japan-time-calendar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.japan-time-calendar-label {
  font-weight: 500;
  opacity: 0.9;
}

/* Footer */
.japan-time-footer {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 20px;
}

.japan-time-footer-text {
  margin: 0;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Theme Variations */
.japan-time-container.theme-sakura {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

.japan-time-container.theme-ocean {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.japan-time-container.theme-sunset {
  background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
}

.japan-time-container.theme-forest {
  background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

/* Hidden class for toggle functionality */
.japan-time-hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .japan-time-container {
    padding: 15px;
    border-radius: 15px;
  }
  
  .japan-time-main-clock {
    flex-direction: column;
    text-align: center;
  }
  
  .japan-time-analog-clock {
    width: 150px;
    height: 150px;
  }
  
  .japan-time-controls {
    flex-direction: column;
    align-items: center;
  }
  
  .japan-time-btn {
    width: 100%;
    max-width: 200px;
  }
  
  .japan-time-cities-grid,
  .japan-time-comparison-grid,
  .japan-time-calendar-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .japan-time-container {
    padding: 10px;
  }
  
  .japan-time-current-time {
    font-size: 2rem;
  }
  
  .japan-time-analog-clock {
    width: 120px;
    height: 120px;
  }
}