/* 기본 스타일 */
:root {
  --primary-color: #0366d6;
  --primary-hover: #0256bf;
  --secondary-color: #28a745;
  --secondary-hover: #218838;
  --danger-color: #dc3545;
  --danger-hover: #c82333;
  --text-color: #24292e;
  --text-secondary: #586069;
  --border-color: #e1e4e8;
  --bg-color: #f6f8fa;
  --card-bg: #ffffff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* 카드 스타일 */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

/* 타이포그래피 */
h1, h2, h3, h4 {
  margin-top: 0;
  color: var(--text-color);
}

h1 {
  font-size: 1.8rem;
  font-weight: 600;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.link-highlight {
  font-weight: 500;
}

/* 폼 요소 */
.form-group {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.2);
}

input::placeholder {
  color: #a0aec0;
}

/* 버튼 스타일 */
button {
  cursor: pointer;
  font-size: 1rem;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius);
  border: none;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary, #login-btn, #register-btn {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover, #login-btn:hover, #register-btn:hover {
  background-color: var(--primary-hover);
}

#logout-btn {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

#logout-btn:hover {
  background-color: var(--bg-color);
  color: var(--danger-color);
}

.btn-small {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s;
}

.btn-small:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* 메시지 스타일 */
.error-message {
  color: var(--danger-color);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.notification {
  background-color: #e3f2fd;
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
}

.notification.success {
  background-color: #e8f5e9;
  border-left-color: var(--secondary-color);
}

.notification.error {
  background-color: #ffebee;
  border-left-color: var(--danger-color);
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

/* 네비게이션 메뉴 */
header {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.logo-container {
  margin-bottom: 1rem;
}

.logo-container h1 {
  color: var(--primary-color);
  margin: 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-menu {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li {
  margin-right: 1.5rem;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-menu a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* 섹션 스타일 */
.section {
  margin-bottom: 2rem;
}

/* API 목록 스타일 */
.api-item {
  margin-bottom: 1.5rem;
}

.api-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.api-badge {
  background-color: var(--primary-color);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.api-details {
  display: flex;
  align-items: center;
  margin: 1rem 0;
}

.api-method {
  background-color: var(--secondary-color);
  color: white;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.75rem;
  font-family: monospace;
}

.api-path {
  font-family: monospace;
  background-color: var(--bg-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

.api-requirements {
  background-color: var(--bg-color);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

.api-requirements h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.api-requirements ul {
  margin: 0;
  padding-left: 1.5rem;
}

.api-requirements code {
  background-color: var(--border-color);
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  font-family: monospace;
}

.api-actions {
  margin-top: 1rem;
  text-align: right;
}

/* 토큰 관리 스타일 */
.token-form {
  margin-bottom: 2rem;
}

.token-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background-color: white;
  transition: transform 0.2s, box-shadow 0.2s;
}

.token-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.token-info {
  flex-grow: 1;
}

.token-name {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.token-value {
  font-family: monospace;
  background-color: var(--bg-color);
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.3rem;
  word-break: break-all;
  font-size: 0.9rem;
}

.token-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.delete-token {
  background-color: transparent;
  color: var(--danger-color);
  padding: 0.5rem;
  border: 1px solid var(--border-color);
}

.delete-token:hover {
  background-color: var(--danger-color);
  color: white;
}

/* 관리자 등록 및 로그인 폼 */
#admin-register-form, #admin-login-form {
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 푸터 */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  nav {
    flex-direction: column;
  }
  
  .nav-menu {
    margin-bottom: 1rem;
  }
  
  .token-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .token-info {
    margin-bottom: 1rem;
    width: 100%;
  }
  
  .delete-token {
    width: 100%;
  }
} 