/* Modern Responsive Design für Fragebogen */

:root {
   --primary-color: #4A90E2;
   --secondary-color: #7ED321;
   --text-dark: #333333;
   --text-light: #666666;
   --bg-light: #F8F9FA;
   --bg-white: #FFFFFF;
   --border-color: #E0E0E0;
   --hover-color: #F0F7FF;
   --success-color: #5CB85C;
   --shadow: 0 2px 8px rgba(0,0,0,0.1);
   --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
}

* {
   box-sizing: border-box;
}

body {
   font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
   font-size: 16px;
   line-height: 1.6;
   color: var(--text-dark);
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   padding: 0;
   margin: 0;
   min-height: 100vh;
}

#site {
   max-width: 1200px;
   margin: 20px auto;
   padding: 20px;
   background: var(--bg-white);
   border-radius: 16px;
   box-shadow: var(--shadow-lg);
}

/* Info-Boxen */
p.text {
   margin: 30px 0;
   padding: 25px 30px;
   text-align: center;
   font-size: 18px;
   line-height: 1.8;
   border: none;
   border-left: 4px solid var(--primary-color);
   background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
   border-radius: 12px;
   box-shadow: var(--shadow);
   color: #1565C0;
   font-weight: 500;
}

/* Demographie-Auswahl */
.demographic-section {
   background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
   padding: 25px;
   border-radius: 12px;
   margin: 30px 0;
   border-left: 4px solid #9C27B0;
   color: #6A1B9A;
}

.demographic-section b {
   display: inline-block;
   font-size: 16px;
   color: #6A1B9A;
   margin-right: 15px;
   min-width: 120px;
   font-weight: 600;
}

.demographic-section select {
   padding: 10px 15px;
   font-size: 15px;
   border: 2px solid var(--border-color);
   border-radius: 8px;
   background: var(--bg-white);
   color: var(--text-dark);
   cursor: pointer;
   transition: all 0.3s ease;
   min-width: 200px;
}

.demographic-section select:hover {
   border-color: var(--primary-color);
}

.demographic-section select:focus {
   outline: none;
   border-color: var(--primary-color);
   box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Tabellen */
table {
   width: 100%;
   border-collapse: separate;
   border-spacing: 0;
   margin: 30px 0;
   border-radius: 12px;
   overflow: hidden;
   box-shadow: var(--shadow);
}

thead tr {
   background: linear-gradient(135deg, var(--primary-color) 0%, #357ABD 100%);
   color: white;
}

th {
   padding: 15px 12px;
   font-weight: 600;
   text-align: center;
   font-size: 14px;
}

th.text {
   font-size: 18px;
   text-align: left;
   padding: 20px;
   white-space: normal;
   word-wrap: break-word;
}

th.text1 {
   font-size: 13px;
   line-height: 1.3;
   white-space: normal;
   word-wrap: break-word;
}

td {
   padding: 15px 12px;
   border-bottom: 1px solid var(--border-color);
}

td.antwort {
   text-align: center;
   padding: 12px 8px;
   min-width: 50px;
   vertical-align: middle;
}

td.antwort .checkbox,
td.antwort .radio {
   margin: 0 auto;
   float: none;
   clear: none;
}

/* Zebra-Streifen */
#even {
   background-color: var(--bg-white);
}

#odd {
   background-color: var(--bg-light);
}

tbody tr {
   transition: background-color 0.2s ease;
}

tbody tr:hover {
   background-color: var(--hover-color) !important;
}

/* Custom Radio Buttons - NICHT ÄNDERN */
.checkbox, .radio {
   width: 26px;
   height: 25px;
   padding: 0;
   margin: 0 9px;
   background: url(checkbox.png) no-repeat;
   display: block;
   clear: left;
   float: left;
   cursor: pointer;
}

.radio {
   background: url(radio.png) no-repeat;
}

input.styled {
   display: none;
}

/* Buttons */
.button {
   background: linear-gradient(135deg, var(--success-color) 0%, #4CAF50 100%);
   color: white;
   border: none;
   padding: 15px 40px;
   font-size: 18px;
   font-weight: 600;
   border-radius: 8px;
   cursor: pointer;
   transition: all 0.3s ease;
   box-shadow: var(--shadow);
   text-transform: uppercase;
   letter-spacing: 0.5px;
}

.button:hover {
   transform: translateY(-2px);
   box-shadow: var(--shadow-lg);
   background: linear-gradient(135deg, #4CAF50 0%, var(--success-color) 100%);
}

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

#submit-zeile {
   text-align: right;
   margin: 40px 0 20px;
   padding: 20px 0;
}

/* Eingabefelder */
.eingabe, .eingabe-pb {
   border: 2px solid var(--border-color);
   background-color: var(--bg-white);
   font-size: 15px;
   padding: 10px 12px;
   border-radius: 8px;
   transition: all 0.3s ease;
}

.eingabe {
   width: 120px;
}

.eingabe-pb {
   margin: 0px 10px;
}

.eingabe:focus, .eingabe-pb:focus {
   outline: none;
   border-color: var(--primary-color);
   box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Zusatzfragen Styling */
.question-section {
   background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
   padding: 25px;
   border-radius: 12px;
   margin: 30px 0;
   border-left: 4px solid #FF9800;
   color: #E65100;
}

.question-section span {
   font-size: 16px !important;
   display: inline;
}

.question-section b {
   display: inline;
}

.question-section select {
   padding: 8px 12px;
   font-size: 15px;
   border: 2px solid var(--border-color);
   border-radius: 8px;
   background: var(--bg-white);
   margin: 0 10px;
   cursor: pointer;
   transition: all 0.3s ease;
   display: inline-block;
   vertical-align: middle;
}

.question-section select:hover {
   border-color: var(--primary-color);
}

.question-section input[type="checkbox"],
.question-section input[type="radio"] {
   display: inline-block;
   vertical-align: middle;
}

.question-section label {
   display: inline;
   margin-right: 20px;
}

/* Checkboxen */
input[type="checkbox"] {
   width: 20px;
   height: 20px;
   cursor: pointer;
   margin-right: 8px;
   accent-color: var(--primary-color);
}

input[type="checkbox"] + label {
   margin-right: 20px;
   cursor: pointer;
   font-size: 15px;
}

/* Radio Buttons für Zusatzfragen */
input[type="radio"]:not(.styled) {
   width: 18px;
   height: 18px;
   cursor: pointer;
   margin-right: 8px;
   accent-color: var(--primary-color);
}

input[type="radio"]:not(.styled) + label {
   margin-right: 25px;
   cursor: pointer;
   font-size: 15px;
}

/* Fieldsets */
fieldset {
   position: relative;
   padding: 20px;
   margin: 20px 0;
   border: 2px solid var(--border-color);
   border-radius: 12px;
   background: var(--bg-white);
}

legend {
   font-weight: 600;
   padding: 0 10px;
   color: var(--primary-color);
   font-size: 17px;
}

.clear {
   clear: both;
}

/* RESPONSIVE DESIGN */

/* Tablet */
@media screen and (max-width: 1024px) {
   #site {
      margin: 10px;
      padding: 15px;
   }
   
   table {
      font-size: 14px;
   }
   
   th, td {
      padding: 10px 8px;
   }
   
   th.text {
      font-size: 16px;
      padding: 15px;
      white-space: normal;
      word-wrap: break-word;
   }
   
   p.text {
      font-size: 16px;
      padding: 20px;
   }
}

/* Mobile */
@media screen and (max-width: 768px) {
   body {
      background: var(--bg-white);
   }
   
   #site {
      margin: 0;
      padding: 15px;
      border-radius: 0;
   }
   
   p.text {
      font-size: 15px;
      padding: 15px;
      margin: 20px 0;
   }
   
   /* Tabellen für Mobile optimieren */
   table {
      display: block;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      margin: 20px -15px;
      width: calc(100% + 30px);
      border-radius: 0;
   }
   
   thead {
      display: table-header-group;
   }
   
   th {
      font-size: 11px;
      padding: 10px 5px;
      white-space: nowrap;
   }
   
   th.text {
      font-size: 14px;
      padding: 12px 10px;
      white-space: normal;
   }
   
   th.text1 {
      font-size: 10px;
      line-height: 1.2;
      white-space: normal;
      word-wrap: break-word;
   }
   
   td {
      font-size: 13px;
      padding: 10px 8px;
   }
   
   td.antwort {
      padding: 8px 4px;
      min-width: 40px;
      vertical-align: middle;
   }
   
   td.antwort .checkbox,
   td.antwort .radio {
      margin: 0 auto;
      float: none;
      clear: none;
   }
   
   /* Demografische Sektion */
   .demographic-section {
      padding: 15px;
   }
   
   .demographic-section b {
      display: block;
      margin-bottom: 10px;
   }
   
   .demographic-section select {
      width: 100%;
      margin-bottom: 15px;
   }
   
   /* Buttons */
   .button {
      width: 100%;
      padding: 15px 20px;
      font-size: 16px;
   }
   
   #submit-zeile {
      text-align: center;
   }
   
   /* Zusatzfragen */
   .question-section {
      padding: 15px;
   }
   
   .question-section span {
      font-size: 14px !important;
      display: inline;
   }
   
   .question-section b {
      display: inline;
   }
   
   .question-section select {
      display: inline-block;
      width: auto;
      min-width: 100px;
      margin: 5px 10px;
   }
   
   .question-section input[type="checkbox"],
   .question-section input[type="radio"] {
      display: inline-block;
      vertical-align: middle;
   }
   
   .question-section label {
      display: inline;
      margin-right: 15px;
   }
}

/* Kleine Mobile Geräte */
@media screen and (max-width: 480px) {
   p.text {
      font-size: 14px;
      line-height: 1.6;
   }
   
   th.text {
      font-size: 13px;
   }
   
   th.text1 {
      font-size: 9px;
      white-space: normal;
      word-wrap: break-word;
   }
   
   td {
      font-size: 12px;
   }
}

/* Drucken */
@media print {
   body {
      background: white;
   }
   
   #site {
      box-shadow: none;
      max-width: 100%;
   }
   
   .button {
      display: none;
   }
   
   table {
      page-break-inside: avoid;
   }
}
