
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8f9fa;
  color: #202124;
  line-height: 1.5;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
}

.header-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.language-select {
  padding: 8px 12px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #ffffff;
  color: #202124;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.language-select:hover {
  border-color: #5f6368;
}

.language-select:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

h1 {
  text-align: center;
  color: #1a73e8;
  font-size: 2.75rem;
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  text-align: center;
  color: #5f6368;
  margin-bottom: 48px;
  font-size: 1rem;
  font-weight: 400;
}

.timer-section, .youtube-section, .video-list-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
  border: 1px solid #e8eaed;
}

h2 {
  margin-bottom: 24px;
  color: #202124;
  font-size: 1.375rem;
  font-weight: 500;
  border: none;
  padding: 0;
}

.input-group {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

input[type="number"] {
  padding: 12px 16px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 14px;
  width: 120px;
  transition: all 0.2s ease;
  background: #ffffff;
  font-family: inherit;
}

input[type="number"]:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

input[type="number"]:hover {
  border-color: #5f6368;
}

.url-input, .title-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 14px;
  min-width: 300px;
  transition: all 0.2s ease;
  background: #ffffff;
  font-family: inherit;
}

.url-input:focus, .title-input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.url-input:hover, .title-input:hover {
  border-color: #5f6368;
}

.video-list {
  margin-top: 24px;
}

.empty-state {
  text-align: center;
  color: #5f6368;
  font-size: 14px;
  padding: 32px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px dashed #dadce0;
}

.video-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  background: #ffffff;
}

.video-item:hover {
  border-color: #1a73e8;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3);
}

.video-item.active {
  border-color: #1a73e8;
  background: #e8f0fe;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3);
}

.video-thumbnail {
  width: 80px;
  height: 60px;
  background: #f1f3f4;
  border-radius: 6px;
  margin-right: 16px;
  background-size: cover;
  background-position: center;
  border: 1px solid #e8eaed;
}

.video-info {
  flex: 1;
}

.video-title {
  font-weight: 500;
  margin-bottom: 4px;
  color: #202124;
  font-size: 14px;
}

.video-url {
  font-size: 12px;
  color: #5f6368;
  word-break: break-all;
  line-height: 1.4;
}

.video-actions {
  display: flex;
  gap: 8px;
}

.btn.small {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
}

.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.btn.primary {
  background: #1a73e8;
  color: white;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3);
}

.btn.primary:hover:not(:disabled) {
  background: #1557b0;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.4), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

.btn.primary:active:not(:disabled) {
  background: #1557b0;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3);
}

.btn.secondary {
  background: #ffffff;
  color: #1a73e8;
  border: 1px solid #dadce0;
  box-shadow: none;
}

.btn.secondary:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #5f6368;
}

.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.display-section {
  text-align: center;
  margin-bottom: 32px;
  padding: 32px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
  border: 1px solid #e8eaed;
}

.timer-display {
  font-size: 4rem;
  font-weight: 300;
  color: #1a73e8;
  margin-bottom: 16px;
  font-family: 'Google Sans', 'Roboto Mono', monospace;
  letter-spacing: 2px;
}

.timer-display.warning {
  color: #f9ab00;
  animation: pulse 1s infinite;
}

.timer-display.danger {
  color: #d93025;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.status {
  color: #5f6368;
  font-size: 14px;
  padding: 12px 24px;
  background: #f8f9fa;
  border-radius: 24px;
  display: inline-block;
  border: 1px solid #e8eaed;
}

.video-container {
  margin-top: 24px;
  text-align: center;
  min-height: 315px;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8eaed;
  color: #5f6368;
  font-size: 14px;
}

.video-container iframe {
  border-radius: 8px;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3);
}

.instructions {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  margin-top: 24px;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
  border: 1px solid #e8eaed;
}

.instructions h3 {
  margin-bottom: 16px;
  color: #202124;
  font-size: 1.125rem;
  font-weight: 500;
}

.instructions ol {
  padding-left: 24px;
}

.instructions li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: #5f6368;
  font-size: 14px;
}

/* Notification styles */
@keyframes slideIn {
  from { 
    transform: translateX(100%); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

/* Google-style focus rings */
*:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 640px) {
  .container {
    padding: 16px;
  }
  
  .timer-section, .youtube-section, .video-list-section, .instructions {
    padding: 24px;
  }
  
  .input-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .url-input {
    min-width: auto;
  }
  
  .timer-display {
    font-size: 3rem;
  }
  
  .video-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .video-info {
    width: 100%;
  }
  
  .video-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  h1 {
    font-size: 2.25rem;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 12px 20px;
    font-size: 13px;
  }
  
  .timer-display {
    font-size: 2.5rem;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  position: relative;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 10px;
  cursor: pointer;
}

.close-button:hover {
  color: black;
}

.policy-text {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}