/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

/* Design System & Variables */
:root {
  --font-display: 'Outfit', 'Sarabun', sans-serif;
  --font-body: 'Sarabun', sans-serif;

  /* Premium Color Palette */
  --bg-primary: #080f1e;
  --bg-secondary: #0d1b2e;
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-gold: #ffbd59;
  --text-main: #f3f6fa;
  --text-muted: #8fa0b5;
  --border-color: rgba(79, 172, 254, 0.2);
  --glass-bg: rgba(13, 27, 46, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 8px 32px 0 rgba(0, 242, 254, 0.15);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at 50% 50%, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-x: hidden;
}

/* Background Animated Orbs */
.bg-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.25;
  pointer-events: none;
}

.orb-1 {
  background: var(--accent-cyan);
  top: 10%;
  left: 10%;
  animation: floatOrb 10s ease-in-out infinite alternate;
}

.orb-2 {
  background: var(--accent-blue);
  bottom: 15%;
  right: 10%;
  animation: floatOrb 12s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(30px) scale(1.1); }
}

/* Main Container Card (Glassmorphism) */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px 30px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Premium Card Header */
.card-header {
  text-align: center;
  margin-bottom: 30px;
}

.logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(0, 242, 254, 0.3);
  animation: logoPulse 3s infinite alternate;
}

@keyframes logoPulse {
  0% { transform: scale(1); box-shadow: 0 8px 20px rgba(0, 242, 254, 0.3); }
  100% { transform: scale(1.05); box-shadow: 0 12px 28px rgba(0, 242, 254, 0.5); }
}

.logo-icon {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #080f1e;
}

.card-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  background: linear-gradient(to right, #ffffff, #cfd9e8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* LINE Connect Brand Colors */
.line-theme-title {
  color: #06c755;
  font-weight: 600;
}

/* Form Styling */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.input-container {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  transition: var(--transition-smooth);
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px 14px 44px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.form-input:focus + .input-icon {
  color: var(--accent-cyan);
}

/* User Profile Badge (LINE Login integration) */
.user-profile-badge {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  margin-right: 16px;
  background: #15253f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

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

.profile-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-main);
}

.profile-status {
  font-size: 12px;
  color: var(--accent-cyan);
}

/* Button & Link Styles */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
  color: #080f1e;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-line {
  background-color: #06c755;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(6, 199, 85, 0.2);
}

.btn-line:hover {
  background-color: #05b04b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Alert Notification Boxes */
.alert {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: shake 0.5s ease-in-out;
}

.alert-danger {
  background: rgba(239, 83, 80, 0.1);
  border: 1px solid rgba(239, 83, 80, 0.2);
  color: #ef5350;
}

.alert-success {
  background: rgba(102, 187, 106, 0.1);
  border: 1px solid rgba(102, 187, 106, 0.2);
  color: #66bb6a;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Decorative Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 24px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.divider:not(:empty)::before {
  margin-right: .5em;
}

.divider:not(:empty)::after {
  margin-left: .5em;
}

/* Success Checkmark Animation */
.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  position: relative;
  background: rgba(102, 187, 106, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkmark-circle {
  border: 4px solid #66bb6a;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: absolute;
  animation: scaleUp 0.4s ease-in-out forwards;
}

.checkmark-icon {
  font-size: 40px;
  color: #66bb6a;
  animation: scaleUp 0.4s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes scaleUp {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Member Stats (Dashboard or Info) */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Admin Dashboard Table */
.admin-card {
  max-width: 960px;
}

.admin-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
  color: var(--accent-blue);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.badge-warning {
  background: rgba(224, 168, 0, 0.15);
  color: #ffc107;
  border: 1px solid rgba(224, 168, 0, 0.2);
}

/* Push message controls */
.push-form {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 24px;
}

.push-form-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 16px;
}

/* Custom dropdown style */
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238fa0b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
}

select.form-input option {
  background-color: var(--bg-secondary);
  color: var(--text-main);
}

/* Radio layout */
.radio-group {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.radio-input {
  accent-color: var(--accent-cyan);
}

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

.footer-link {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .card {
    padding: 30px 20px;
  }
}
