/* ========================================
   Sugi's English Learning - Common Styles
   Based on Anki Maker Design System
   ======================================== */

:root {
  --primary: #003399;
  --primary-light: #E6F0FF;
  --primary-dark: #002266;
  --accent: #FF9900;
  --accent-light: #FFF5E6;
  --accent-dark: #E68A00;
  --bg: #F4F7FA;
  --card-bg: #FFFFFF;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #E0E0E0;
  --border-light: #F0F0F0;
  --success: #22a822;
  --error: #d94040;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --nav-height: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-height);
}

/* ========== Global Navigation ========== */
.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 18px;
  margin-right: 24px;
  flex-shrink: 0;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-logo span {
  display: none;
}

@media (min-width: 768px) {
  .nav-logo span {
    display: inline;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary);
  color: white;
}

.nav-item .nav-icon {
  font-size: 16px;
}

/* Mobile: show only icons */
@media (max-width: 600px) {
  .nav-item {
    padding: 8px 10px;
  }
  .nav-item .nav-text {
    display: none;
  }
  .nav-item .nav-icon {
    font-size: 18px;
  }
}

/* ========== App Header ========== */
.app-header {
  background: var(--card-bg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.app-header .logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.app-header .app-logo {
  height: 40px;
  width: auto;
}

.app-header .app-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.app-header .app-desc {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
}

/* ========== Container ========== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ========== Card ========== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 51, 153, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 153, 0, 0.4);
}

.btn-outline {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-round {
  border-radius: 50px;
  padding: 14px 32px;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 17px;
}

/* ========== Forms ========== */
input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ========== Footer ========== */
footer {
  text-align: center;
  padding: 24px 20px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
}

/* ========== Utilities ========== */
.hidden {
  display: none !important;
}

.text-primary {
  color: var(--primary);
}

.text-accent {
  color: var(--accent);
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
