/* Modern CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* CSS Variables */
:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --background: #0f172a;
  --surface: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --border-radius: 12px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Styles */
body {
  font-family: var(--font-family);
  background: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.container {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

/* Header */
header {
  margin-bottom: 3rem;
}

header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Codename Display */
.codename-display {
  background: var(--surface);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.type-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.codename {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  word-break: break-word;
}

/* Controls */
.controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  min-width: 160px;
}

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

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(100, 116, 139, 0.3);
}

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

/* Responsive Design */
@media (max-width: 640px) {
  header h1 {
    font-size: 2.25rem;
  }
  
  .codename {
    font-size: 2rem;
  }
  
  .codename-display {
    padding: 2rem 1.5rem;
  }
  
  .controls {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.875rem;
  }
  
  .codename {
    font-size: 1.75rem;
  }
  
  header p {
    font-size: 1rem;
  }
}

/* Animation for codename changes */
.codename {
  transition: opacity 0.15s ease;
}

.codename.updating {
  opacity: 0.7;
}