/* ===============================
   ILMHONA CV GENERATOR — STYLE
   Modern, adaptive & clean UI
   Author: Sulton Zairov x GPT-5
=================================*/

/* ---------- Base ---------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0A192F;
  --bg-card: #112240;
  --accent: #2B7FFF;
  --accent-hover: #1D5FD6;
  --text: #E6F1FF;
  --muted: #8892B0;
  --yellow: #FFD166;
  --danger: #C0392B;
  --success: #2ECC71;
  --radius: 14px;
  --shadow: 0 8px 25px rgba(0,0,0,0.3);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

/* ---------- Header ---------- */
header {
  background: rgba(17, 34, 64, 0.9);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  padding: 12px 40px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-header {
  height: 40px;
}

nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 24px;
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover {
  color: var(--accent);
}

/* ---------- Container ---------- */
.container {
  max-width: 950px;
  margin: 50px auto;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 45px 55px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.8s ease-in-out;
}

/* ---------- Logo box ---------- */
.logo-box {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  width: 90px;
  margin-bottom: 10px;
}

h1 {
  font-size: 28px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.blue { color: var(--accent); }

.subtitle {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------- Form ---------- */
.cv-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 22px;
}

.form-group {
  position: relative;
  display: flex;
  align-items: center;
  background: #1C2E4A;
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.form-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(43,127,255,0.2);
}

.form-group i {
  color: var(--accent);
  font-size: 20px;
  margin-right: 10px;
}

input, textarea, select {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  resize: none;
}

textarea {
  min-height: 90px;
}

::placeholder {
  color: var(--muted);
}

.form-group.full {
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: flex-start;
  background: #162B4A;
  padding: 14px 18px;
}

.form-group.full i {
  margin-bottom: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 15px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(43,127,255,0.25);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(43,127,255,0.35);
}

/* ---------- Admin Table ---------- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table th {
  background: var(--accent);
  color: white;
  padding: 14px 12px;
  text-align: left;
  font-weight: 600;
}

.admin-table td {
  padding: 12px 14px;
  background: #132A4C;
  border-bottom: 1px solid #0A192F;
}

.admin-table tr:hover td {
  background: #163460;
}

.btn.small {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin-right: 4px;
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.btn.small.blue { background: var(--accent); }
.btn.small.red { background: var(--danger); }
.btn.small:hover { opacity: 0.85; }

/* ---------- Headings ---------- */
h2 {
  color: var(--yellow);
  font-size: 17px;
  margin-bottom: 8px;
  font-weight: 600;
}

h1, h2, h3, h4 {
  scroll-margin-top: 80px;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0A192F;
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 25px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Adaptive ---------- */
@media (max-width: 1024px) {
  .container {
    padding: 35px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 10px 25px;
  }

  .header-container {
    flex-direction: column;
  }

  nav {
    margin-top: 8px;
  }

  .container {
    margin: 20px;
    padding: 25px;
  }

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

  .form-group {
    padding: 10px 12px;
  }

  .btn {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 22px;
  }

  .subtitle {
    font-size: 13px;
  }

  .btn {
    font-size: 15px;
    padding: 13px;
  }

  .form-group i {
    font-size: 18px;
  }
}

/* === Loader и Toast === */
.btn.gradient.loading {
  background: linear-gradient(90deg, #3f83ff, #1e58e6);
  cursor: wait;
  opacity: 0.9;
}
.spin {
  animation: spin 1.1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #2B7FFF;
  color: white;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
