* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #121212;
  color: #ffffff;
  padding: 2rem;
}

#app {
  max-width: 1000px;
  margin: 0 auto;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hidden {
  display: none !important;
}

h1 {
  text-align: center;
  color: #f0f0f0;
}

/* Setup Screen */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-weight: bold;
  color: #b3b3b3;
}

input {
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid #333;
  background-color: #1e1e1e;
  color: white;
  font-size: 1rem;
}

input[type="color"] {
  padding: 0;
  height: 42px;
  width: 50px;
  border: none;
  cursor: pointer;
}

.setup-speaker-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
}

button {
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  border: none;
  background-color: #333;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #444;
}

.primary-btn {
  background-color: #4b88ff;
  font-weight: bold;
}

.primary-btn:hover {
  background-color: #3b78ef;
}

.remove-speaker-btn {
  background-color: #ff4b4b;
}

.remove-speaker-btn:hover {
  background-color: #ef3b3b;
}

/* Main Screen */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
}

#countdown {
  font-size: 4rem;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.control-btn {
  flex: 1;
  max-width: 200px;
  padding: 1rem;
  font-size: 1.1rem;
}

/* Progress Bar */
.bars-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-container {
  width: 100%;
  height: 60px;
  background-color: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 2px solid #333;
}

#progress-bar {
  width: 100%;
  height: 100%;
  position: relative;
}

.progress-segment {
  position: absolute;
  height: 100%;
  top: 0;
  transition: width 1s linear, left 1s linear;
}

.sub-progress-container {
  height: 30px;
}

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

.speaker-card {
  background-color: #1e1e1e;
  padding: 1.5rem;
  border-radius: 8px;
  border: 2px solid #333;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.speaker-card.active {
  border-color: var(--speaker-color);
  box-shadow: 0 0 15px var(--speaker-color);
  transform: scale(1.02);
}

.speaker-name {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.speaker-time {
  font-size: 2rem;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  color: var(--speaker-color);
}

.speaker-key {
  margin-top: 1rem;
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: #333;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #b3b3b3;
}

.instructions {
  text-align: center;
  color: #b3b3b3;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.app-footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  color: #888;
  font-size: 0.9rem;
}

.app-footer a {
  color: #4b88ff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}

.app-footer a:hover {
  color: #3b78ef;
}

/* Mobile Styles */
@media (max-width: 768px) {
  body {
    padding: 1rem;
    padding-bottom: 80px; /* Miejsce na przyciski na dole */
  }

  h1 {
    font-size: 1.5rem;
  }

  #countdown {
    font-size: 3rem;
  }

  .progress-container {
    height: 40px;
  }

  .sub-progress-container {
    height: 20px;
  }

  .setup-speaker-row {
    flex-wrap: wrap;
  }
  
  .setup-speaker-row input[type="text"] {
    flex: 1;
    min-width: 120px;
  }
  
  .controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background-color: #1e1e1e;
    border-top: 1px solid #333;
    margin: 0;
    z-index: 100;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5);
  }
  
  .control-btn {
    max-width: none;
  }
}
