/* ===== SkillHive Global Styles ===== */

/* -- CSS Variables -- */
:root {
  --primary-color: #004aad;
  --primary-dark: #003780;
  --primary-light: #0066ff;
  --secondary-color: #007bff;
  --success-color: #28a745;
  --success-hover: #218838;
  --danger-color: #dc3545;
  --warning-color: #ffdd57;
  --light-bg: #f7f9fc;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-secondary: #555555;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -- Reset -- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, #f7f9fc 0%, #eef4ff 100%);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  position: relative;
}

body > header {
  margin-bottom: 20px;
}

/* ===== Headers & Navigation ===== */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

header h1 {
  font-size: 24px;
  letter-spacing: 0.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #e8f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
  display: flex;
  gap: 25px;
  align-items: center;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--warning-color);
  transition: var(--transition);
  transform: translateX(-50%);
}

nav a:hover {
  color: var(--warning-color);
  background: rgba(255, 221, 87, 0.1);
}

nav a:hover::after {
  width: 80%;
}

/* ===== Buttons ===== */
button, .btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  font-size: 15px;
  box-shadow: 0 4px 15px rgba(0, 74, 173, 0.2);
  position: relative;
  overflow: hidden;
}

button::before, .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 74, 173, 0.3);
}

button:active, .btn:active {
  transform: translateY(0);
}

button:disabled, .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== Links ===== */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

a:hover::after {
  width: 100%;
}

/* ===== Forms ===== */
form {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  margin: 40px auto;
  border: 1px solid rgba(0, 74, 173, 0.1);
  backdrop-filter: blur(10px);
}

form h2 {
  margin-bottom: 28px;
  color: var(--primary-color);
  text-align: center;
  font-size: 24px;
  font-weight: 700;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 14px;
}

.field-icon {
  margin-right: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
  color: #999;
}

input:focus, 
textarea:focus, 
select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
  background: var(--white);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* ===== Dashboard ===== */
.dashboard {
  max-width: 1000px;
  margin: 40px auto;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 74, 173, 0.08);
}

.dashboard h2 {
  color: var(--primary-color);
  margin-bottom: 28px;
  font-size: 22px;
  font-weight: 700;
}

.dashboard a {
  display: inline-block;
  margin: 12px 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--white);
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 74, 173, 0.2);
  text-decoration: none;
}

.dashboard a:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 74, 173, 0.3);
}

/* ===== Job Cards ===== */
.job-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

.job-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.job-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.job-card h3 {
  color: var(--primary-color);
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
}

.job-card p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.job-card .btn {
  background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.job-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* ===== Chat ===== */
.chat-box {
  border: 2px solid var(--border-color);
  padding: 16px;
  height: 400px;
  overflow-y: auto;
  background: linear-gradient(135deg, #f9f9f9 0%, #f5f5f5 100%);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.msg {
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 75%;
  word-wrap: break-word;
  animation: slideIn 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sent {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: var(--white);
  margin-left: auto;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.received {
  background: var(--white);
  color: var(--text-dark);
  margin-right: auto;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-color);
}

#typing {
  color: #999;
  font-style: italic;
  margin-top: 8px;
  font-size: 14px;
}

/* ===== Inbox ===== */
.inbox {
  max-width: 700px;
  margin: 40px auto;
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 74, 173, 0.08);
}

.conversation {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  transition: var(--transition);
  cursor: pointer;
}

.conversation:last-child {
  border: none;
}

.conversation:hover {
  padding-left: 8px;
  background: rgba(0, 74, 173, 0.02);
}

.conversation strong {
  color: var(--primary-color);
  font-weight: 700;
}

/* ===== Notifications ===== */
.notification-badge {
  background: linear-gradient(135deg, var(--danger-color) 0%, #ff6b6b 100%);
  color: var(--white);
  border-radius: 50%;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  position: absolute;
  top: -8px;
  right: -10px;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }

  header {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  header h1 {
    font-size: 20px;
  }

  nav {
    gap: 12px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .dashboard, form {
    width: 90%;
    margin: 20px auto;
    padding: 20px;
  }

  .chat-box {
    height: 300px;
  }

  .job-card {
    padding: 16px;
  }

  .msg {
    max-width: 90%;
  }

  button, .btn {
    padding: 10px 18px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 13px;
  }

  header {
    padding: 12px;
  }

  header h1 {
    font-size: 18px;
  }

  nav {
    gap: 8px;
  }

  nav a {
    padding: 6px 12px;
    font-size: 13px;
  }

  form {
    max-width: 95%;
    padding: 20px;
  }

  .dashboard {
    padding: 16px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea,
  select {
    padding: 10px 12px;
  }

  .chat-box {
    height: 250px;
  }
}


/* ===== Inline Layout for Premium + Ads ===== */
.inline-layout {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 28px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 20px 15px;
  scroll-snap-type: x mandatory;
  max-width: 1400px;
  margin: 0 auto;
}

.inline-layout > div {
  flex: 0 0 300px;
  scroll-snap-align: center;
}

/* Premium Plans */
.plan {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 2px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.plan::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.plan:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

.plan h3 {
  color: var(--primary-color);
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 700;
}

.plan .price {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 16px 0;
}

.plan .price small {
  font-size: 16px;
  color: var(--text-secondary);
}

.plan ul {
  list-style: none;
  margin: 20px 0;
  text-align: left;
}

.plan li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.plan li::before {
  content: '✓';
  color: var(--success-color);
  font-weight: bold;
  margin-right: 10px;
  font-size: 18px;
}

.plan li:last-child {
  border: none;
}

/* Highlighted Pro Plan */
.plan.highlight {
  border: 2px solid var(--secondary-color);
  background: linear-gradient(135deg, rgba(0, 74, 173, 0.05) 0%, rgba(0, 123, 255, 0.05) 100%);
  transform: scale(1.05);
}

.plan.highlight:hover {
  transform: scale(1.08) translateY(-8px);
}

.plan.highlight .price {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Ad Cards */
.ad-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  padding: 24px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.ad-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: var(--transition);
}

.ad-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.ad-card:hover::before {
  left: 100%;
}

.ad-card img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  transition: var(--transition);
  object-fit: cover;
  height: 200px;
}

.ad-card:hover img {
  transform: scale(1.05);
}

.ad-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 700;
}

.ad-card p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.ad-card button, .plan button {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-light) 100%);
  color: var(--white);
  border: none;
  border-radius: 25px;
  padding: 12px 28px;
  margin-top: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
  font-size: 14px;
}

.ad-card button:hover,
.plan button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

/* Mobile Responsive for Premium/Ads */
@media (max-width: 768px) {
  .inline-layout {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 15px 10px;
    gap: 16px;
  }

  .inline-layout > div {
    flex: 0 0 85%;
    min-width: 260px;
  }

  .plan, .ad-card {
    padding: 16px;
  }

  .plan.highlight {
    transform: scale(1.02);
  }

  .plan.highlight:hover {
    transform: scale(1.05) translateY(-6px);
  }
}

/* ===== Utility Classes ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 12px auto 0;
  border-radius: 2px;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }

.text-bold { font-weight: 700; }
.text-italic { font-style: italic; }

.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.bg-white { background: var(--white); }
.bg-light { background: var(--light-bg); }

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 74, 173, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

.slide-in-up {
  animation: slideInUp 0.5s ease;
}

.slide-in-down {
  animation: slideInDown 0.5s ease;
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: rgba(0, 74, 173, 0.1);
  color: var(--primary-color);
}

.badge-success {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

.badge-danger {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
}

.badge-warning {
  background: rgba(255, 221, 87, 0.1);
  color: #856404;
}

/* ===== Loading State ===== */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

.spinner {
  border: 3px solid rgba(0, 74, 173, 0.1);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== Tables ===== */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

thead {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

th {
  padding: 16px;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
  background: rgba(0, 74, 173, 0.02);
}

tbody tr:last-child td {
  border-bottom: none;
}
