/* CSS Design System - Modern Light Mode */

:root {
  --font-primary: 'Outfit', 'Noto Sans JP', sans-serif;
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --accent: #06b6d4;
  --error: #ef4444;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0 20px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 0;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.theme-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto 40px auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Welcome & Card Styling */
.welcome-card, .login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.welcome-card::before, .login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.welcome-card {
  text-align: center;
}

.login-card {
  max-width: 450px;
  width: 100%;
  margin: 40px auto;
}

.title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.subtitle {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.description {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 32px auto;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input {
  font-family: var(--font-primary);
  font-size: 1rem;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-app);
  color: var(--text-main);
  transition: var(--transition);
}

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

/* Buttons */
.btn {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-primary:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-outline:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
}

/* Alerts */
.error-box {
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  color: var(--error);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
}

/* Interactive Area */
.interactive-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.counter {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  background-color: var(--bg-app);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.counter.bump {
  transform: scale(1.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* Features Grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Dashboard UI */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
}

.dashboard-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.dashboard-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

/* Loading Overlay */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: 16px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

/* Footer */
.footer {
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .welcome-card, .login-card {
    padding: 32px 20px;
  }
  .title {
    font-size: 2rem;
  }
}
