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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  min-height: 100vh;
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ddd;
}

.header h1 {
  font-size: 1.5rem;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: #4a90d9;
  color: white;
  width: 100%;
}

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

.btn-secondary {
  background-color: transparent;
  color: #4a90d9;
  border: 1px solid #4a90d9;
}

.btn-secondary:hover {
  background-color: #4a90d9;
  color: white;
}

.btn-close {
  background: none;
  border: none;
  color: #999;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.btn-close:hover {
  color: #333;
}

/* Auth Card (Login Page) */
.auth-card {
  max-width: 400px;
  margin: 100px auto;
  background-color: #fff;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-card h1 {
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.subtitle {
  color: #666;
  margin-bottom: 30px;
}

/* Form */
.form-group {
  margin-bottom: 20px;
}

input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
  color: #333;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type="password"]:focus {
  outline: none;
  border-color: #4a90d9;
}

input[type="password"]::placeholder {
  color: #999;
}

.error-message {
  color: #ff6b6b;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Video Card */
.video-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(74, 144, 217, 0.2);
}

.video-thumbnail {
  aspect-ratio: 16 / 9;
  background-color: #e8f0f8;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.play-icon {
  font-size: 3rem;
  color: rgba(74, 144, 217, 0.8);
  transition: transform 0.2s;
}

.video-card:hover .play-icon {
  transform: scale(1.2);
  color: #3a7bc8;
}

.video-info {
  padding: 16px;
}

.video-card-title {
  font-size: 1rem;
  font-weight: 500;
}

/* Empty Message */
.empty-message {
  text-align: center;
  color: #666;
  padding: 60px 20px;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-content {
  background-color: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  font-size: 1.1rem;
}

/* Video Container */
.video-container {
  position: relative;
  background-color: #000;
}

.video-container video {
  width: 100%;
  max-height: calc(90vh - 80px);
  display: block;
}

/* Section */
section h2 {
  margin-bottom: 20px;
  font-size: 1.3rem;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .auth-card {
    margin: 50px auto;
    padding: 30px 20px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-width: 100%;
  }
}
