/*
  -----------------------------------------------------------
  Copyright (c) 2026 Ahngunism. All rights reserved.
  -----------------------------------------------------------
  File           : style.css
  Last updated:  : 20260306 222904
  Version        : ver 1
  -----------------------------------------------------------
*/

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1a1a25;
  --bg-input: #1e1e2a;

  --border: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-primary: #f0f0f5;
  --text-secondary: #9898aa;
  --text-muted: #5a5a6e;

  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);

  --success: #22d3a0;
  --error: #ef4444;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
}

/* ============================================================
   Global Reset
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ============================================================
   Login Page
   ============================================================ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
  overflow: hidden;
  position: relative;
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px 36px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s;
  animation: cardEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card.success {
  transform: scale(0.95) translateY(-10px);
  opacity: 0;
}

@keyframes cardEntry {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Logo */
.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.logo-icon {
  display: inline-flex;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
  font-family: var(--font-mono);
}

/* Form */
.login-form { display: flex; flex-direction: column; gap: 20px; }

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

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

.input-wrapper input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--text-secondary); }

.error-msg {
  color: var(--error);
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-login:active { transform: translateY(0); }

.btn-login.loading span { opacity: 0; }
.btn-login.loading::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  top: 50%; left: 50%;
  margin: -10px 0 0 -10px;
  animation: spin 0.6s linear infinite;
}

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

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Shake animation */
.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Particles */
.particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -10px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 50%;
  animation: float linear infinite;
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ============================================================
   Dashboard
   ============================================================ */
.dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.header-badge {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
  font-family: var(--font-mono);
}

.header-right { display: flex; align-items: center; gap: 12px; }

.btn-logout {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

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

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}

.card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.download-icon {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
}

.guide-icon {
  background: rgba(34, 211, 160, 0.1);
  color: var(--success);
}

.card-title {
  font-size: 17px;
  font-weight: 600;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Download Card */
.download-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.file-icon {
  color: var(--accent);
  flex-shrink: 0;
  opacity: 0.7;
}

.file-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-name {
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
}

.version-badge {
  font-size: 11px;
  background: rgba(34, 211, 160, 0.15);
  color: var(--success);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.file-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.file-deploy-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  opacity: 0.8;
  margin-top: 4px;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
  color: #fff;
}

.btn-download:active { transform: translateY(0); }

/* Guide Card */
.guide-body { padding: 28px; }

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-number {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
  .login-card { padding: 36px 24px 28px; }
  .header { padding: 12px 16px; }
  .main-content { padding: 20px 16px; }
  .card-header { padding: 20px; }
  .download-body, .guide-body { padding: 20px; }
  .file-info { flex-direction: column; text-align: center; }
}
