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

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --dark-bg: #0f0f23;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --error-color: #ff6b6b;
  --success-color: #51cf66;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--dark-bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.2) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(118, 75, 162, 0.2) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Glass Card Effect */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-header {
  text-align: center;
  margin-bottom: 40px;
}

.icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--primary-gradient);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.icon-wrapper svg {
  color: white;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.card-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 400;
}

/* Forms */
.login-form {
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-link {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 2px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-link {
  background: transparent;
  color: var(--text-secondary);
  width: auto;
  padding: 12px 0;
}

.btn-link:hover {
  color: var(--text-primary);
}

/* Messages */
.error-message {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--error-color);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 16px;
  display: none;
}

.error-message.show {
  display: block;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.card-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
  text-align: center;
}

.card-footer p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Screens */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* Video Container */
.video-container {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px;
  animation: fadeInUp 0.6s ease-out;
}

.video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.video-header h2 {
  font-size: 24px;
  font-weight: 700;
}

.video-header .btn-secondary {
  width: auto;
  padding: 12px 24px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  margin-bottom: 24px;
}

.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
}

.video-info {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

.info-item svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.4);
}

/* Admin Panel */
.admin-card {
  max-width: 800px;
  margin: 0 auto;
}

.admin-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.admin-actions .btn-primary,
.admin-actions .btn-secondary {
  flex: 1;
}

.passwords-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.passwords-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
  padding: 4px;
}

.passwords-list::-webkit-scrollbar {
  width: 8px;
}

.passwords-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.passwords-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.passwords-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.password-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.password-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.password-item.used {
  opacity: 0.5;
}

.password-info {
  flex: 1;
}

.password-code {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  margin-bottom: 4px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.password-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

.password-status {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.password-status.available {
  background: rgba(81, 207, 102, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(81, 207, 102, 0.3);
}

.password-status.used {
  background: rgba(255, 107, 107, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.password-status.expired {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.password-status.unused {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.password-item.expired {
  opacity: 0.6;
}

.time-remaining {
  color: #4facfe;
  font-weight: 600;
}

.expired-text {
  color: #ffc107;
  font-weight: 600;
}

.unused-text {
  color: #667eea;
  font-weight: 600;
}

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

.btn-copy {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: #667eea;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-copy:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.5);
}

.btn-copy.copied {
  background: rgba(81, 207, 102, 0.2);
  border-color: rgba(81, 207, 102, 0.5);
  color: var(--success-color);
}

.btn-delete {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--error-color);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  background: rgba(255, 107, 107, 0.2);
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  margin: 0 auto 16px;
  opacity: 0.3;
}

.back-link {
  text-align: center;
  margin-top: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .glass-card {
    padding: 32px 24px;
  }
  
  .card-header h1 {
    font-size: 24px;
  }
  
  .admin-actions {
    flex-direction: column;
  }
  
  .video-header {
    flex-direction: column;
    gap: 16px;
  }
  
  .video-header .btn-secondary {
    width: 100%;
  }
  
  .password-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .password-actions {
    width: 100%;
  }
  
  .password-actions .btn-delete {
    flex: 1;
  }
}
