:root {
  /* Colors */
  --bg-color: #0d1117;
  --container-bg: #161b22;
  --text-color: #c9d1d9;
  --accent-color: #21262d;
  --link-color: #6fefc7;
  --thumbnail-bg: #1f2937;
  --success-color: #6fefc7;
  --error-color: #ff3b3b;
  --hover-dark: #111827;
  
  /* Effects */
  --hover-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
  --hover-transform: translateY(-6px) scale(1.02);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'SF Pro', 'Inter', sans-serif;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  padding: 2rem;
  font-size: 1.2rem;
}

.container {
  max-width: 1000px;
  margin: auto;
  background: var(--container-bg);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-size: 1.5rem;
  color: var(--success-color);
  font-weight: bold;
}

h1 {
  font-size: 4rem;
  font-weight: 900;
  text-align: center;
  color: var(--link-color);
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.card-container h2 {
  color: var(--success-color);
  font-size: 1.8rem;
  margin-bottom: 2rem;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#login-container h2 {
  font-size: 2rem;
}

.card-container {
  max-width: 400px;
  margin: 5vh auto;
  background: var(--accent-color);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  text-align: center;
}

#admin-container {
  margin: 3rem auto;
  display: none;
}

.card-container input {
  width: 100%;
  padding: 0.9rem;
  margin-bottom: 1.5rem;
  border-radius: 0.6rem;
  border: none;
  outline: none;
  font-size: 1rem;
  background: var(--thumbnail-bg);
  color: var(--text-color);
  transition: background 0.2s ease, transform 0.2s ease;
}

.card-container input:focus {
  background: var(--hover-dark);
  transform: scale(1.02);
}

.card-container button {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, var(--success-color), #2dd1a7);
  color: var(--bg-color);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.card-container button:hover {
  transform: translateY(0px) scale(1);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.5);
}

.list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.video-table .list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  transition: transform 0.3s ease;
}

.video-table {
  background: var(--container-bg);
  border: 2px solid #2d3748;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.item {
  display: block;
  background: var(--accent-color);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.item:hover {
  transform: var(--hover-transform);
  box-shadow: var(--hover-shadow);
}

.thumbnail {
  background: var(--thumbnail-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 180px;
  font-weight: 900;
  font-size: 1.4rem;
  text-align: center;
  padding: 1rem;
  color: white;
  position: relative;
  transition: background 0.3s ease;
  border-radius: 0.75rem;
}

.thumbnail:hover {
  background: var(--hover-dark);
}

.order-number {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
}

.message {
  color: var(--error-color);
  margin-top: 35px;
  font-size: 1rem;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease, max-height 0.5s ease;
}

.message.success {
  color: var(--success-color);
}

#logout-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

#logout-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, var(--success-color), #2dd1a7);
  color: var(--bg-color);
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.95rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#logout-btn:hover {
  transform: translateY(0px) scale(1);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.5);
}

#logout-header {
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

#logout-header:hover {
  color: #2dd1a7;
  transform: scale(1.05);
}

@media (max-width: 1024px) {
  h1 {
    font-size: 3.5rem;
  }
  
  .thumbnail {
    height: 150px;
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 3rem;
  }
  
  .thumbnail {
    height: 140px;
    font-size: 1.1rem;
    padding: 0.8rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .thumbnail {
    height: 120px;
    font-size: 1rem;
    padding: 0.5rem;
  }
  
  .card-container input,
  .card-container button {
    width: 100%;
  }
  
  .list {
    gap: 0.8rem;
  }

}
