/* ========================================
   Shared Base Styles
   ======================================== */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative;
  overflow-x: hidden;
}

/* Animated background grid */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  pointer-events: none;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Floating orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: #3b82f6;
  top: -100px;
  right: -100px;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: #10b981;
  bottom: -50px;
  left: -50px;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.1); }
}

/* ========================================
   Index Page - Login Form Styles
   ======================================== */

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}

body.login-page .orb {
  position: absolute;
}

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

.card {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 3rem 2.5rem;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(59, 130, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.5);
}

.logo-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

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

.header h1 {
  color: #f8fafc;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.header p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.form-label {
  display: block;
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  transition: color 0.2s;
}

.form-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(100, 116, 139, 0.3);
  border-radius: 12px;
  color: #f8fafc;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
}

.form-input::placeholder {
  color: #64748b;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: #3b82f6;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px -3px rgba(59, 130, 246, 0.4);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(59, 130, 246, 0.5);
}

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

.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
}

.security-badge svg {
  color: #10b981;
}

.security-badge span {
  color: #64748b;
  font-size: 0.8rem;
}

.hint {
  text-align: center;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.hint p {
  color: #94a3b8;
  font-size: 0.8rem;
}

.hint code {
  background: rgba(59, 130, 246, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #60a5fa;
  font-family: 'Monaco', 'Consolas', monospace;
}

/* ========================================
   Secret Page - Secrets Grid Styles
   ======================================== */

body.secret-page {
  padding: 2rem 1rem;
}

body.secret-page .container {
  max-width: 900px;
  margin: 0 auto;
}

body.secret-page .header {
  margin-bottom: 3rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.status-badge span {
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 500;
}

body.secret-page .header h1 {
  font-size: 2.5rem;
}

body.secret-page .header p {
  max-width: 500px;
  margin: 0 auto;
}

/* Secrets Grid */
.secrets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.secret-card {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.secret-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  opacity: 0;
  transition: opacity 0.3s;
}

.secret-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

.secret-card:hover::before {
  opacity: 1;
}

.secret-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  font-size: 0.85rem;
  font-weight: 600;
}

.secret-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(59, 130, 246, 0.2));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.secret-icon svg {
  width: 24px;
  height: 24px;
  color: #10b981;
}

.secret-card p {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.7;
}

.secret-card code {
  background: rgba(59, 130, 246, 0.2);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: #60a5fa;
  font-size: 0.85rem;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
}

.footer p {
  color: #64748b;
  font-size: 0.85rem;
}

.footer a {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: #93c5fd;
}

/* ========================================
   Access Denied Page Styles
   ======================================== */

body.denied-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}

body.denied-page .orb {
  position: absolute;
}

body.denied-page .orb-1 {
  background: #ef4444;
}

.denied-card {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(239, 68, 68, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.denied-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

.denied-icon svg {
  width: 40px;
  height: 40px;
  color: #ef4444;
}

body.denied-page .header h1 {
  color: #fca5a5;
}

body.denied-page .header p {
  margin-bottom: 2rem;
}

.retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px -3px rgba(239, 68, 68, 0.4);
}

.retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(239, 68, 68, 0.5);
}

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

.security-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
}

.security-warning svg {
  color: #f59e0b;
}

.security-warning span {
  color: #64748b;
  font-size: 0.8rem;
}

/* ========================================
   Responsive Styles
   ======================================== */

@media (max-width: 640px) {
  body.secret-page .header h1 {
    font-size: 1.75rem;
  }

  .secrets-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 2rem 1.5rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }
}
