/* ============================================================================
   Tipptreff.app - Main Styles
   Mobile-First, Modern CSS Architecture
   ============================================================================ */

/* ============================================================================
   CSS Variables (Design Tokens) - GREEN & GOLD THEME
   ============================================================================ */
:root {
  /* Colors - Primary Palette (Green) */
  --primary-color: #10b981;
  --primary-dark: #059669;
  --primary-light: #34d399;
  
  /* Colors - Secondary Palette (Gold/Yellow) */
  --secondary-color: #f59e0b;
  --secondary-dark: #d97706;
  --secondary-light: #fbbf24;
  
  /* Colors - Accent */
  --accent-color: #14b8a6; /* Teal */
  --accent-dark: #0d9488;
  --accent-light: #2dd4bf;
  
  /* Colors - Semantic */
  --success-color: #10b981;
  --success-dark: #059669;
  --success-light: #34d399;
  
  --danger-color: #ef4444;
  --danger-dark: #dc2626;
  --danger-light: #f87171;
  
  --warning-color: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #fbbf24;
  
  --info-color: #06b6d4;
  --info-dark: #0891b2;
  --info-light: #22d3ee;
  
  /* Colors - Neutrals (Dark mode friendly) */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  
  --border-color: #475569;
  --border-dark: #334155;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Courier New", monospace;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ============================================================================
   CSS Reset & Base Styles
   ============================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* ============================================================================
   Typography
   ============================================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.125rem 0.25rem;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--secondary-light);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 1rem;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 1rem;
}

/* ============================================================================
   Layout Utilities
   ============================================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}

.col {
  flex: 1 0 0%;
  padding: 0 0.5rem;
}

/* Responsive Grid */
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ============================================================================
   Buttons
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  user-select: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Button Variants */
.btn-primary {
  color: #0f172a;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  color: #0f172a;
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  font-weight: 600;
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--secondary-light);
  border-color: var(--secondary-light);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-success {
  color: #0f172a;
  background-color: var(--success-color);
  border-color: var(--success-color);
  font-weight: 600;
}

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

.btn-warning {
  color: #0f172a;
  background-color: var(--warning-color);
  border-color: var(--warning-color);
}

.btn-outline {
  color: var(--primary-light);
  background-color: transparent;
  border-color: var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
  color: #0f172a;
  background-color: var(--primary-color);
  text-decoration: none;
}

/* Button Sizes */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.125rem;
}

/* ============================================================================
   Forms
   ============================================================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-control:disabled {
  background-color: var(--bg-tertiary);
  cursor: not-allowed;
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.form-check-input {
  width: 1.125rem;
  height: 1.125rem;
  margin-right: 0.5rem;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.form-check-label {
  margin-bottom: 0;
  cursor: pointer;
  color: var(--text-secondary);
}

.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.invalid-feedback {
  display: none;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--danger-color);
}

.form-control.is-invalid {
  border-color: var(--danger-color);
}

.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

/* ============================================================================
   Alerts
   ============================================================================ */
.alert {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}

.alert-success {
  color: var(--success-light);
  background-color: rgba(16, 185, 129, 0.1);
  border-color: var(--success-dark);
}

.alert-danger {
  color: var(--danger-light);
  background-color: rgba(239, 68, 68, 0.1);
  border-color: var(--danger-dark);
}

.alert-warning {
  color: var(--warning-light);
  background-color: rgba(245, 158, 11, 0.1);
  border-color: var(--warning-dark);
}

.alert-info {
  color: var(--info-light);
  background-color: rgba(6, 182, 212, 0.1);
  border-color: var(--info-dark);
}

/* ============================================================================
   Badges
   ============================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  border-radius: var(--radius-full);
}

.badge-primary {
  color: #0f172a;
  background-color: var(--primary-color);
}

.badge-success {
  color: #0f172a;
  background-color: var(--success-color);
}

.badge-danger {
  color: white;
  background-color: var(--danger-color);
}

.badge-warning {
  color: #0f172a;
  background-color: var(--warning-color);
}

.badge-info {
  color: white;
  background-color: var(--info-color);
}

/* ============================================================================
   Utility Classes
   ============================================================================ */
/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Transform */
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

/* Font Weight */
.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-grid { display: grid; }

/* Flex Utilities */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-stretch { align-items: stretch; }

/* Spacing */
.m-0 { margin: 0; }
.m-1 { margin: var(--spacing-sm); }
.m-2 { margin: var(--spacing-md); }
.m-3 { margin: var(--spacing-lg); }
.m-4 { margin: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }
.p-4 { padding: var(--spacing-xl); }

/* Width & Height */
.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Position */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* Visibility */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Background */
.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary { background-color: var(--bg-tertiary); }

/* Main Content Wrapper */
.main-content {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Mobile: Base styles already defined above */

@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .container {
    padding: 0 0.75rem;
  }
}