
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  transition: all 0.3s ease;
  line-height: 1.6;
}

body.admin-mode {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

header.scrolled {
  padding: 12px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  background: rgba(255, 255, 255, 0.98);
}

header.scrolled h1 {
  font-size: clamp(20px, 4vw, 24px);
  margin: 0 0 12px 0;
}

header.scrolled .top-controls {
  gap: 8px;
}

header.scrolled .top-controls input, 
header.scrolled .top-controls select {
  padding: 8px 12px;
  font-size: 14px;
}

header.scrolled .post-btn, 
header.scrolled .quick-post-btn {
  padding: 8px 16px;
  font-size: 13px;
}

header h1 {
  margin: 0 0 20px 0;
  font-size: clamp(28px, 5vw, 36px);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
}

.top-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  transition: all 0.3s ease;
}

.top-controls input, 
.top-controls select {
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  background: white;
  transition: all 0.3s ease;
  min-width: 140px;
  font-weight: 500;
}

.top-controls input:focus,
.top-controls select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.top-controls input::placeholder {
  color: #a0a0a0;
  font-weight: 400;
}

.post-btn, .quick-post-btn {
  padding: 12px 24px;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.post-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.quick-post-btn {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.post-btn:hover, .quick-post-btn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.post-btn:active, .quick-post-btn:active {
  transform: translateY(0);
}

.admin-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 59, 48, 0.95);
  color: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(255, 59, 48, 0.3);
  display: none;
  z-index: 1001;
  min-width: 280px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
}

.admin-panel.active {
  display: block;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.admin-badge {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 15px;
  animation: pulse 2s infinite;
  font-size: 12px;
  letter-spacing: 1px;
}

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

.admin-stats {
  font-size: 14px;
  margin: 8px 0;
  font-weight: 500;
}

.admin-instructions {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 15px;
  line-height: 1.5;
}

main {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 20px;
}

.job-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.job-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.job-card.admin-mode {
  border: 2px solid #ff3b30;
  background: rgba(255, 245, 245, 0.95);
}

.job-card.admin-mode::before {
  background: linear-gradient(135deg, #ff3b30 0%, #ff6b6b 100%);
}

.job-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.job-card h3 {
  margin: 0 0 16px 0;
  color: #2d3748;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.job-card p { 
  margin: 12px 0; 
  color: #4a5568; 
  line-height: 1.7;
  font-size: 15px;
}

.job-card small { 
  color: #718096; 
  font-size: 13px;
  font-weight: 500;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
  padding: 16px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 12px;
  border-left: 4px solid #667eea;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #4a5568;
  font-weight: 500;
  padding: 4px 0;
}

.meta-item::before {
  content: '•';
  color: #667eea;
  font-weight: bold;
  font-size: 16px;
}

.share-btn, .delete-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-left: 8px;
  position: relative;
  overflow: hidden;
}

.share-btn {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
}

.delete-btn {
  background: linear-gradient(135deg, #ff3b30 0%, #dc3545 100%);
  color: white;
  display: none;
}

.delete-btn.admin-visible {
  display: inline-block;
}

.share-btn:hover, .delete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.job-id {
  position: absolute;
  top: 15px;
  right: 20px;
  background: #ff3b30;
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: bold;
  display: none;
  letter-spacing: 0.5px;
}

.job-id.admin-visible {
  display: block;
}

.job-poster {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin-top: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  transition: transform 0.3s ease;
}

.job-poster:hover {
  transform: scale(1.02);
}

.image-only-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

footer {
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.1);
  color: #4a5568;
  font-size: 14px;
  font-weight: 500;
}

footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  margin-left: 8px;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #764ba2;
}

.modal {
  display: none;
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 24px;
  max-width: 520px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
  position: relative;
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from { transform: translateY(-30px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f7fafc;
}

.modal-header h2 {
  margin: 0;
  color: #2d3748;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.3px;
}

.close-btn {
  background: #f7fafc;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #a0aec0;
  padding: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #edf2f7;
  color: #4a5568;
  transform: rotate(90deg);
}

.modal-content input, 
.modal-content textarea,
.modal-content select {
  width: 100%;
  padding: 16px;
  margin: 12px 0;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  font-family: inherit;
  font-weight: 500;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.modal-content textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.modal-content button {
  width: 100%;
  padding: 16px;
  margin-top: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.modal-content button:hover { 
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.modal-content button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.success, .error {
  display: none;
  text-align: center;
  font-weight: 600;
  padding: 16px;
  border-radius: 12px;
  margin-top: 16px;
  font-size: 14px;
}

.success {
  color: #38a169;
  background: #f0fff4;
  border: 1px solid #9ae6b4;
}

.error {
  color: #e53e3e;
  background: #fed7d7;
  border: 1px solid #feb2b2;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  font-size: 16px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.demo-notice {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  text-align: center;
  padding: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  border-radius: 12px;
  font-size: 14px;
}

.required {
  color: #e53e3e;
  font-weight: bold;
  margin-left: 4px;
}

.file-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 12px 0;
}

.file-input {
  width: 100%;
  padding: 20px;
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f7fafc;
  font-weight: 500;
  color: #4a5568;
}

.file-input:hover {
  border-color: #667eea;
  background: #f0f7ff;
  transform: translateY(-1px);
}

.quick-upload-zone {
  width: 100%;
  padding: 50px 30px;
  border: 3px dashed #56ab2f;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s ease;
  background: linear-gradient(135deg, #f8fff9 0%, #f0fff0 100%);
  margin: 20px 0;
}

.quick-upload-zone:hover {
  border-color: #a8e6cf;
  background: linear-gradient(135deg, #f0fff0 0%, #e8f5e8 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(86, 171, 47, 0.2);
}

.quick-upload-zone.dragover {
  border-color: #a8e6cf;
  background: linear-gradient(135deg, #e8f5e8 0%, #dcf4dc 100%);
  transform: scale(1.02);
}

.quick-upload-zone h3 {
  margin: 0 0 12px 0;
  color: #2d3748;
  font-size: 20px;
  font-weight: 700;
}

.quick-upload-zone p {
  margin: 8px 0;
  color: #4a5568;
  font-weight: 500;
}

.confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.confirm-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0,0,0,0.5);
}

.confirm-content h3 {
  color: #e53e3e;
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 700;
}

.confirm-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 30px;
}

.confirm-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 14px;
  min-width: 100px;
}

.confirm-btn.danger {
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  color: white;
}

.confirm-btn.cancel {
  background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
  color: white;
}

.confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.passcode-input {
  margin: 20px 0;
  padding: 12px;
  border: 2px solid #e53e3e;
  border-radius: 10px;
  text-align: center;
  font-size: 16px;
  width: 140px;
  font-weight: 600;
}

.posting-mode-toggle {
  display: flex;
  background: #f7fafc;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 30px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.mode-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
  color: #4a5568;
}

.mode-btn.active {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: #667eea;
  transform: translateY(-1px);
}

.image-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: 16px;
  margin: 16px 0;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

@keyframes slideInSuccess {
  from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  header {
    padding: 16px;
  }
  
  header.scrolled {
    padding: 10px 16px;
  }
  
  header h1 {
    font-size: 24px;
    margin-bottom: 16px;
  }
  
  header.scrolled h1 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  .top-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  header.scrolled .top-controls {
    gap: 6px;
  }
  
  .top-controls input,
  .top-controls select,
  .post-btn,
  .quick-post-btn {
    width: 100%;
    max-width: none;
  }
  
  header.scrolled .top-controls input,
  header.scrolled .top-controls select,
  header.scrolled .post-btn,
  header.scrolled .quick-post-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  main {
    margin: 20px auto;
    padding: 0 16px;
  }
  
  .job-card {
    padding: 20px;
    margin-bottom: 16px;
  }
  
  .job-card h3 {
    font-size: 18px;
  }
  
  .job-meta {
    flex-direction: column;
    gap: 12px;
  }
  
  .modal-content {
    margin: 20px;
    padding: 30px;
    max-height: 85vh;
  }

  .admin-panel {
    position: fixed;
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
  }
  
  .confirm-buttons {
    flex-direction: column;
  }
  
  .confirm-btn {
    width: 100%;
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body:not(.admin-mode) {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  }
  
  .job-card {
    background: rgba(45, 55, 72, 0.95);
    color: #e2e8f0;
  }
  
  .job-card h3 {
    color: #e2e8f0;
  }
  
  .job-card p {
    color: #cbd5e0;
  }
  
  .modal-content {
    background: #2d3748;
    color: #e2e8f0;
  }
  
  .modal-content input,
  .modal-content textarea,
  .modal-content select {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
  }
}
