/* 관리자 페이지 스타일 */

/* 로그인 페이지 */
.admin-login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-secondary);
}

.admin-login-box {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2rem;
  max-width: 380px;
  width: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.admin-login-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--text-primary);
}

.oauth-login-section {
  margin-bottom: 1.5rem;
}

.btn-github-oauth {
  width: 100%;
  background: #24292e;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-github-oauth:hover {
  background: #1a1e22;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.btn-github-oauth:active {
  background: #0d1117;
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.github-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

.token-login-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.token-toggle {
  text-align: center;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.link-btn:hover {
  text-decoration: underline;
}

.token-help {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.token-help p {
  margin: 0.25rem 0;
}

.token-help a {
  color: var(--accent-color);
  text-decoration: none;
}

.token-help a:hover {
  text-decoration: underline;
}

.help-text {
  font-size: 0.8125rem;
  margin-top: 0.5rem;
}

.oauth-setup-guide {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.oauth-setup-guide h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.oauth-setup-guide ol {
  margin-left: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.8;
}

.oauth-setup-guide ol li {
  margin-bottom: 0.75rem;
}

.oauth-setup-guide ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.oauth-setup-guide code {
  background: var(--bg-secondary);
  padding: 0.125rem 0.25rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.oauth-setup-guide pre {
  background: var(--bg-secondary);
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  overflow-x: auto;
}

.oauth-setup-guide pre code {
  background: transparent;
  padding: 0;
}

.oauth-fallback {
  padding: 1rem;
}

.oauth-fallback h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.oauth-fallback ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.oauth-fallback ol li {
  margin-bottom: 0.75rem;
}

.token-input-fallback {
  margin-top: 1rem;
}

.oauth-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.oauth-divider::before,
.oauth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 45%;
  height: 1px;
  background: var(--border-color);
}

.oauth-divider::before {
  left: 0;
}

.oauth-divider::after {
  right: 0;
}

.oauth-divider span {
  background: var(--bg-primary);
  padding: 0 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

.admin-login-form {
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-help {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.form-help code {
  background: var(--bg-secondary);
  padding: 0.125rem 0.25rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 0.5rem;
  width: auto;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

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

.btn-outline:hover {
  background: var(--bg-secondary);
}

.btn-block {
  width: 100%;
}

.error-message {
  background: #fee2e2;
  color: #991b1b;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  border: 1px solid #fecaca;
}

.admin-login-info {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.admin-login-info h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.admin-login-info ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.admin-login-info ol li {
  margin-bottom: 0.5rem;
}

.security-warning {
  background: var(--highlight-bg);
  color: var(--highlight-color);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
}

.security-warning strong {
  display: block;
  margin-bottom: 0.5rem;
}

.security-warning ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

/* 에디터 페이지 */
.editor-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.editor-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.editor-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.editor-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.editor-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.editor-sidebar {
  width: 300px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem;
  overflow-y: auto;
}

.editor-meta h3 {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.editor-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-toolbar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toolbar-btn {
  padding: 0.5rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all 0.2s;
}

.toolbar-btn:hover {
  background: var(--border-color);
  transform: translateY(-1px);
}

.editor-textarea {
  flex: 1;
  width: 100%;
  padding: 1.5rem;
  border: none;
  resize: none;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9375rem;
  line-height: 1.6;
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
}

.preview-panel {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  background: var(--bg-primary);
}

.preview-content {
  max-width: 800px;
  margin: 0 auto;
}

.preview-content h1,
.preview-content h2,
.preview-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.preview-content p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.preview-content code {
  background: var(--code-bg);
  padding: 0.125rem 0.25rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.preview-content pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin-bottom: 1rem;
}

.preview-content pre code {
  background: transparent;
  padding: 0;
}

.editor-status {
  padding: 1rem 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: none;
}

.editor-status-info {
  color: var(--accent-color);
}

.editor-status-success {
  color: #059669;
  background: #d1fae5;
}

.editor-status-error {
  color: #dc2626;
  background: #fee2e2;
}

/* 로그인 필요 메시지 */
.editor-login-required {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-required-box {
  text-align: center;
  background: var(--bg-primary);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  max-width: 500px;
}

.login-required-box h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.login-required-box p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .editor-content {
    flex-direction: column;
  }
  
  .editor-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .editor-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .editor-actions {
    justify-content: stretch;
  }
  
  .editor-actions .btn {
    flex: 1;
  }
}

/* 다크 모드 지원 */
[data-theme="dark"] .error-message {
  background: #7f1d1d;
  color: #fecaca;
  border-color: #991b1b;
}

[data-theme="dark"] .security-warning {
  background: #3B3B1F;
  color: #FCD34D;
}

[data-theme="dark"] .editor-status-success {
  background: #064e3b;
  color: #6ee7b7;
}

[data-theme="dark"] .editor-status-error {
  background: #7f1d1d;
  color: #fecaca;
}


