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

:root {
  /* Color Palette (Modern & Premium Light Design) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --color-primary: #4f46e5;       /* Indigo */
  --color-primary-light: #818cf8;
  --color-secondary: #06b6d4;     /* Cyan */
  --color-secondary-light: #67e8f9;
  --color-accent: #f43f5e;        /* Rose */
  --color-success: #10b981;       /* Emerald */
  --color-error: #ef4444;         /* Red */
  
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --gradient-accent: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
  --gradient-card-hover: linear-gradient(135deg, rgba(79, 70, 229, 0.02) 0%, rgba(6, 182, 212, 0.02) 100%);
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-premium: 0 20px 25px -5px rgba(79, 70, 229, 0.08), 0 10px 10px -5px rgba(6, 182, 212, 0.03);

  --font-sans: 'Outfit', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
}

/* Card Component (Login Form / Dashboard) */
.card {
  background-color: var(--bg-secondary);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-premium);
  border: 1px solid rgba(226, 232, 240, 0.8);
  width: 100%;
  transition: var(--transition-smooth);
}

.card:hover {
  box-shadow: 0 25px 35px -5px rgba(79, 70, 229, 0.12), 0 15px 15px -5px rgba(6, 182, 212, 0.05);
}

/* Header & Typography */
.card-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-secondary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--color-secondary-light);
}

.title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1.25rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 1);
  font-family: inherit;
  font-size: 0.95rem;
  background-color: #f8fafc;
  transition: var(--transition-smooth);
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary-light);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  gap: 0.5rem;
  color: #ffffff;
}

.btn-primary {
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-primary);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

/* Alert & Message Styles */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: fadeIn 0.3s ease;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.08);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.08);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Dashboard / Toppage Specific */
.dashboard-container {
  max-width: 600px;
}

.user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  border: 3px solid #ffffff;
  outline: 1px solid rgba(79, 70, 229, 0.15);
}

.welcome-text {
  font-size: 1.5rem;
  font-weight: 700;
}

.welcome-text span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.info-list {
  width: 100%;
  margin-bottom: 2rem;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  padding: 1.5rem 0;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  font-size: 0.95rem;
}

.info-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.info-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
  gap: 1rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(79, 70, 229, 0.1);
  border-left-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

/* Helper Class */
.hidden {
  display: none !important;
}
