/**
 * manniPhone - Base Styles
 * Gemeinsame CSS-Variablen und Reset
 */

/* CSS Variables */
:root {
  /* Colors */
  --color-bg: #1a1a1a;
  --color-text: #ffffff;
  --color-accent: #0f0;
  --color-display-bg: #2a2a2a;
  --color-display-text: #0f0;
  
  /* Rotary Colors */
  --rotary-bg: #000000;
  --rotary-plate: #1a1a1a;
  --rotary-hole: #ffffff;
  
  /* Nokia Colors */
  --nokia-blue: #1e3a8a;
  --nokia-display: #a5b7a5;
  --nokia-button: #333333;
  
  /* C2 Colors */
  --c2-beige: #d4c5a9;
  --c2-display: #8b9f7f;
  --c2-button: #4a4a4a;
  
  /* Timing */
  --transition-fast: 0.1s;
  --transition-medium: 0.3s;
  --transition-slow: 0.8s;
  
  /* Shadows */
  --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.3);
  --shadow-heavy: 0 10px 40px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
               'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
}

/* Container */
.phone-container {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

/* Header */
h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 255, 0, 0.3);
}

h1 .emoji {
  display: inline-block;
  animation: rotate 3s ease-in-out infinite;
}

@keyframes rotate {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

/* Display (alle Telefone) */
.phone-display {
  background: var(--color-display-bg);
  color: var(--color-display-text);
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #333;
}

.phone-display.pulse {
  animation: displayPulse 0.1s;
}

@keyframes displayPulse {
  50% { 
    opacity: 0.6;
    transform: scale(0.98);
  }
}

/* Actions Container */
.actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Call Button (Hörer) */
.receiver,
.btn-call {
  display: block;
  width: 100%;
  max-width: 250px;
  height: 60px;
  margin: 0 auto;
  background: linear-gradient(135deg, #0a0 0%, #080 100%);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
}

.receiver:hover,
.btn-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(0, 255, 0, 0.4);
}

.receiver:active,
.btn-call:active {
  transform: translateY(0);
  box-shadow: var(--shadow-light);
}

/* Clear Button */
.btn-clear,
.btn-delete {
  display: block;
  width: 100%;
  max-width: 250px;
  height: 50px;
  margin: 0 auto;
  background: linear-gradient(135deg, #444 0%, #222 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: var(--shadow-light);
  transition: all var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
}

.btn-clear:hover,
.btn-delete:hover {
  background: linear-gradient(135deg, #555 0%, #333 100%);
  transform: translateY(-1px);
}

.btn-clear:active,
.btn-delete:active {
  transform: translateY(0);
}

/* Hint Text */
.hint {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #888;
  font-style: italic;
}

/* Back to Menu Link */
.back-link {
  position: fixed;
  top: 20px;
  left: 20px;
  color: var(--color-accent);
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.back-link:hover {
  transform: translateX(-5px);
  color: #fff;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--color-accent);
  animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
  
  .phone-display {
    font-size: 1.2rem;
    padding: 0.8rem;
  }
  
  .phone-container {
    padding: 10px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #f5f5f5;
    --color-text: #1a1a1a;
    --color-display-bg: #e0e0e0;
    --color-display-text: #006600;
  }
  
  body {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus States */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
