/* Reset & global */
*{box-sizing:border-box;margin:0;padding:0;transition:all 0.3s}
body{font-family:system-ui,Segoe UI,Roboto,Arial;background:#0b1220;color:#e6eef8;min-height:100vh;display:flex;flex-direction:column}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(90deg,#081226,#0b1220);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

header h1 {
  font-size: 1.4rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 8px;
}

header .version {
  font-size: 0.85rem;
  color: #9fb0d0;
  font-weight: 400;
}

header .credits {
  font-size: 0.8rem;
  color: #97a8c9;
  margin-top: 2px;
}

.donate-btn {
  background: linear-gradient(135deg,#ff4d6d,#ff7f50);
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255,77,109,0.4);
  transition: all 0.25s ease;
  display: inline-block;
}

.donate-btn:hover {
  background: linear-gradient(135deg,#ff3359,#ff6b3d);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 14px rgba(255,77,109,0.6);
}

.join-btn {
  background: linear-gradient(135deg,#1e40af,#3b82f6);
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(59,130,246,0.4);
  transition: all 0.25s ease;
  display: inline-block;
}

.join-btn:hover {
  background: linear-gradient(135deg,#1e3aa8,#2563eb);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 14px rgba(59,130,246,0.6);
}

.header-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* Layout principal */
main{
  display:grid;
  grid-template-columns:380px 1fr;
  gap:12px;
  padding:12px;
  min-height:calc(100vh - 80px);
  transition:all 0.3s
}

.card{background:linear-gradient(180deg,#071026,#0b1220);padding:16px;border-radius:12px;border:1px solid rgba(255,255,255,.04);width:100%;transition:all 0.3s}

.card:has(#viewer) {
  display:flex;
  flex-direction:column;
  position:relative;
  height:calc(100vh - 120px);
  min-height:400px;
}

/* Profile List */
.profile-list {
  max-height: 50vh;
  overflow-y: auto;
}

.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.05);
  background: rgba(255,255,255,.02);
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.profile-item:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-info h4 {
  color: #10b981;
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.profile-details {
  font-size: 0.85rem;
  color: #9fb0d0;
  margin: 0 0 4px 0;
}

.profile-description {
  font-size: 0.8rem;
  color: #97a8c9;
  font-style: italic;
  margin: 0;
}

.profile-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.load-profile-btn,
.delete-profile-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-profile-btn {
  background: rgba(16,185,129,0.2);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
}

.load-profile-btn:hover {
  background: rgba(16,185,129,0.3);
  transform: translateY(-1px);
}

.delete-profile-btn {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
}

.delete-profile-btn:hover {
  background: rgba(239,68,68,0.3);
  transform: translateY(-1px);
}

.no-profiles {
  text-align: center;
  color: #9fb0d0;
  font-style: italic;
  padding: 32px 16px;
}

/* NEW: Quantity Controls */
.quantity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.quantity-row:hover {
  background: rgba(255,255,255,.06);
}

.quantity-container {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,.05);
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,.1);
  color: #e6eef8;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: rgba(255,255,255,.2);
  color: #10b981;
}

.quantity-btn:active {
  transform: scale(0.95);
}

.quantity-input {
  width: 60px;
  height: 32px;
  border: none;
  background: transparent;
  color: #e6eef8;
  text-align: center;
  font-weight: bold;
  margin: 0;
  padding: 0;

  transform: translateX(10%);
}

.quantity-input:focus {
  outline: none;
  background: rgba(16,185,129,0.1);
}

.quantity-summary {
  padding: 12px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 8px;
  text-align: center;
  color: #10b981;
  margin-top: 8px;
}

/* Form & Inputs */
label{display:block;font-weight:700;margin-bottom:8px;font-size:0.95rem}
select,input,button{padding:10px;border-radius:8px;border:1px solid rgba(255,255,255,.06);background:transparent;color:#e6eef8;width:100%;font-size:14px}
button{cursor:pointer;transition:all 0.2s ease}
button:hover{background:rgba(255,255,255,.1);transform:translateY(-1px)}
.small{font-size:.9rem;color:#9fb0d0;margin-top:6px}
.disabled-field{opacity:0.5;pointer-events:none}

/* Crates */
.crates{display:flex;flex-direction:column;gap:8px;max-height:calc(70vh - 200px);overflow:auto;padding:8px;background:rgba(255,255,255,.02);border-radius:8px;transition:max-height 0.3s}
.crateRow{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;border-radius:6px;background:rgba(255,255,255,.03);transition:all 0.2s ease;cursor:pointer}
.crateRow:hover{background:rgba(255,255,255,.06)}
.crateRow input[type="checkbox"]{appearance:none;width:20px;height:20px;margin-right:10px;border:2px solid rgba(255,255,255,.2);border-radius:6px;position:relative;transition:all 0.2s ease;cursor:pointer}
.crateRow input[type="checkbox"]:checked{background:#10b981;border-color:#10b981;box-shadow:0 0 6px #10b981}
.crateRow input[type="checkbox"]:checked::after{content:"✓";color:#081226;font-size:0.75rem;font-weight:bold;position:absolute;top:1px;left:4px}
.crate-info{flex:1;display:flex;flex-direction:column}
.crate-info .crate-size{font-weight:700;font-size:0.95rem;color:#10b981}
.crate-info .crate-details{font-size:0.8rem;color:#9fb0d0}
.controls{display:flex;gap:8px;margin-top:12px}
.controls button{flex:1}

/* Viewer */
#viewer{
  background:#081226;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.04);
  position:relative;
  overflow:hidden;
  width:100%;
  height:100%;
  min-height:200px;
  flex:1;
}

.viewer-controls{position:absolute;top:12px;right:12px;display:flex;gap:8px;z-index:100}
.viewer-control-btn{background: rgba(7,16,38,.9);border:2px solid rgba(255,255,255,.2);border-radius:10px;color:#e6eef8;cursor:pointer;padding:12px 14px;font-size:16px;font-weight:bold;transition:all 0.25s ease;backdrop-filter:blur(10px);min-width:40px;min-height:40px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 8px rgba(0,0,0,.5), inset 0 0 6px rgba(255,255,255,.1)}
.viewer-control-btn:hover{background:rgba(16,185,129,.3);border-color:#10b981;color:#10b981;transform:scale(1.08) translateY(-2px);box-shadow:0 0 12px rgba(16,185,129,.4)}
.viewer-control-btn.active{background:rgba(16,185,129,.4);border-color:#10b981;color:#10b981;box-shadow:0 0 14px rgba(16,185,129,.6)}
.viewer-info{position:absolute;bottom:12px;left:12px;background:rgba(7,16,38,.9);border:1px solid rgba(255,255,255,.1);border-radius:6px;padding:8px 12px;font-size:0.75rem;color:#9fb0d0;backdrop-filter:blur(10px);z-index:100}

/* Result / Info / Warning */
.result{margin-top:12px;padding:12px;border-radius:8px;background:rgba(255,255,255,.02)}
.ok{color:#7ee787;font-weight:bold} 
.bad{color:#fb8686;font-weight:bold}
.info-box{background:rgba(16,185,129,.1);border:1px solid rgba(16,185,129,.3);padding:12px;border-radius:8px;margin-top:8px}
.info-box .highlight{color:#10b981;font-weight:bold;font-size:1.1rem}
.warning{background: rgba(255, 165, 0, 0.2);border:1px solid #ffa500;padding:8px;border-radius:4px;margin-top:8px}

/* Dropdown custom */
.dropdown{position:relative;width:100%}
.dropdown-toggle{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-radius:12px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.03);color:#e6eef8;cursor:pointer;font-size:0.95rem;font-weight:500;transition:all 0.2s ease}
.dropdown-toggle:hover{background: rgba(255,255,255,.05)}
.dropdown-toggle::after{content:'▾';font-size:0.8rem;color:#9fb0d0}
.dropdown-menu{display:none;position:absolute;top:100%;left:0;right:0;max-height:60vh;overflow:hidden;background:rgba(7,18,38,.95);border:1px solid rgba(255,255,255,.1);border-radius:12px;margin-top:4px;z-index:1000;backdrop-filter:blur(10px)}

.dropdown-search{
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.05);
  background:rgba(255,255,255,.02);
  position:relative;
}

.dropdown-search input{
  width:100%;
  padding:8px 40px 8px 12px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:8px;
  background:rgba(255,255,255,.05);
  color:#e6eef8;
  font-size:0.9rem;
  margin:0;
  transition:all 0.2s ease;
}

.dropdown-search input::placeholder{
  color:#9fb0d0;
  opacity:0.7;
}

.dropdown-search input:focus{
  outline:none;
  border-color:#10b981;
  background:rgba(255,255,255,.08);
  box-shadow:0 0 0 2px rgba(16,185,129,0.2);
}

#clearSearchBtn{
  position:absolute;
  right:20px;
  top:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.2);
  border-radius:6px;
  color:#9fb0d0;
  cursor:pointer;
  padding:4px 6px;
  font-size:12px;
  font-weight:bold;
  width:24px;
  height:24px;
  display:none;
  align-items:center;
  justify-content:center;
  transition:all 0.2s ease;
  backdrop-filter:blur(4px);
}

#clearSearchBtn:hover{
  background:rgba(255,85,85,0.2);
  border-color:rgba(255,85,85,0.4);
  color:#ff5555;
  transform:translateY(-50%) scale(1.05);
}

#clearSearchBtn:active{
  transform:translateY(-50%) scale(0.95);
}

#clearSearchBtn.show{
  display:flex;
  animation:fadeInScale 0.2s ease-out;
}

#clearSearchBtn.hide{
  animation:fadeOutScale 0.15s ease-in forwards;
}

@keyframes fadeInScale{
  from{
    opacity:0;
    transform:translateY(-50%) scale(0.8);
  }
  to{
    opacity:1;
    transform:translateY(-50%) scale(1);
  }
}

@keyframes fadeOutScale{
  from{
    opacity:1;
    transform:translateY(-50%) scale(1);
  }
  to{
    opacity:0;
    transform:translateY(-50%) scale(0.8);
    display:none;
  }
}

.dropdown-search input:focus + #clearSearchBtn{
  border-color:rgba(16,185,129,0.3);
}

.dropdown-items{max-height:55vh;overflow-y:auto;padding:4px 0;transition:max-height 0.3s}
.dropdown-item{display:flex;align-items:center;padding:12px 16px;cursor:pointer;transition:background 0.15s ease;gap:12px}
.dropdown-item:hover{background: rgba(255,255,255,.1)}
.dropdown-item.hidden{display:none}
.brand-logo{width:40px;height:40px;border-radius:8px;background:rgb(255,255,255);display:flex;align-items:center;justify-content:center;font-size:0.9rem;font-weight:bold;color:#10b981;flex-shrink:0;border:1px solid rgba(255,255,255,.1);box-shadow:0 2px 4px rgba(0,0,0,.2)}
.brand-logo img{width:100%;height:100%;object-fit:cover;border-radius:6px}
.dropdown-item-text{flex:1;min-width:0}
.dropdown-item span.name{font-weight:600;margin-right:6px;color:#10b981;display:block;font-size:0.85rem}
.dropdown-item span.brand{font-weight:400;color:#e6eef8;font-size:0.9rem;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dropdown-no-results{padding:16px;text-align:center;color:#9fb0d0;font-size:0.9rem;font-style:italic}

/* Scrollbar */
.dropdown-items::-webkit-scrollbar{width:4px}
.dropdown-items::-webkit-scrollbar-track{background:rgba(255,255,255,.05);border-radius:2px}
.dropdown-items::-webkit-scrollbar-thumb{background:rgba(255,255,255,.2);border-radius:2px}
.dropdown-items::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.3)}
.crates::-webkit-scrollbar{width:6px}
.crates::-webkit-scrollbar-track{background:rgba(255,255,255,.05);border-radius:3px}
.crates::-webkit-scrollbar-thumb{background:rgba(255,255,255,.2);border-radius:3px}
.crates::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.3)}

/* Cockpit mode */
body.cockpit-mode{background:radial-gradient(circle at center, #020611 0%, #000 100%);color:#00ffcc;font-family:'Orbitron',sans-serif}
body.cockpit-mode .card{background:rgba(0,255,204,0.05);border:1px solid rgba(0,255,204,0.3);box-shadow:0 0 12px rgba(0,255,204,0.3)}
body.cockpit-mode .dropdown-toggle, body.cockpit-mode select, body.cockpit-mode input, body.cockpit-mode button{border:1px solid rgba(0,255,204,0.4);background:rgba(0,255,204,0.05);color:#00ffcc}
body.cockpit-mode button:hover{background:rgba(0,255,204,0.2);border-color:#00ffcc;text-shadow:0 0 6px #00ffcc}
body.cockpit-mode #viewer{background:radial-gradient(circle at center, rgba(0,255,204,0.05), #020611);border:1px solid rgba(0,255,204,0.3)}

body.cockpit-mode #clearSearchBtn{
  background:rgba(0,255,204,0.1);
  border-color:rgba(0,255,204,0.3);
  color:#00ffcc;
}

body.cockpit-mode #clearSearchBtn:hover{
  background:rgba(255,85,85,0.2);
  border-color:rgba(255,85,85,0.4);
  color:#ff5555;
}

body.cockpit-mode .dropdown-search input:focus{
  border-color:#00ffcc;
  box-shadow:0 0 0 2px rgba(0,255,204,0.2);
}

body.cockpit-mode .dropdown-search input:focus + #clearSearchBtn{
  border-color:rgba(0,255,204,0.4);
}

/* Media queries responsive */
@media (max-width: 1400px) {
  main {
    grid-template-columns: 340px 1fr;
    gap: 10px;
  }
}

@media (max-width: 1200px) {
  main {
    grid-template-columns: 300px 1fr;
    gap: 8px;
  }
  
  .card {
    padding: 12px;
  }
}

@media (max-width: 1000px) {
  main {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 8px;
  }
  
  #viewer {
    height: 40vh !important;
    min-height: 250px !important;
    flex: none;
  }
  
  .crates {
    max-height: 25vh;
  }
}

@media (max-width: 768px) {
  main {
    padding: 8px;
    gap: 8px;
  }
  
  .card {
    padding: 10px;
  }
  
  #viewer {
    height: 35vh !important;
    min-height: 220px !important;
  }
  
  .viewer-controls {
    top: 8px;
    right: 8px;
    gap: 4px;
  }
  
  .viewer-control-btn {
    padding: 8px 10px;
    min-width: 32px;
    min-height: 32px;
    font-size: 14px;
  }
  
  .viewer-info {
    display: none;
  }
  
  .crates {
    max-height: 20vh;
  }
  
  .dropdown-items {
    max-height: 25vh;
  }
  
  .dropdown-search input {
    padding: 6px 36px 6px 10px;
    font-size: 0.85rem;
  }
  
  #clearSearchBtn {
    right: 18px;
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
}

@media (max-height: 600px) {
  .card:has(#viewer) {
    height: auto;
    min-height: 300px;
  }
  
  #viewer {
    height: 300px !important;
    min-height: 180px !important;
  }
  
  .crates {
    max-height: 20vh;
  }
  
  main {
    min-height: auto;
  }
}

@media (max-height: 500px) {
  .card:has(#viewer) {
    height: auto;
    min-height: 250px;
  }
  
  #viewer {
    height: 250px !important;
    min-height: 200px !important;
  }
  
  .crates {
    max-height: 150px;
  }
  
  header {
    padding: 8px 16px;
  }
  
  main {
    padding: 8px;
    min-height: auto;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1rem;
  }
  
  #viewer {
    height: 30vh !important;
    min-height: 200px !important;
  }
  
  .card, .dropdown-toggle, .dropdown-search input, select, button {
    font-size: 0.85rem;
    padding: 6px;
  }
  
  .crateRow {
    padding: 6px 8px;
    gap: 4px;
  }
  
  .viewer-control-btn {
    padding: 6px 8px;
    font-size: 12px;
    min-width: 28px;
    min-height: 28px;
  }
  
  .controls {
    flex-direction: column;
  }
  
  .controls button {
    margin-bottom: 4px;
  }
  
  .crates {
    max-height: 25vh;
  }
  
  .dropdown-items {
    max-height: 25vh;
  }
  
  .dropdown-search input {
    padding: 6px 32px 6px 8px;
  }
  
  #clearSearchBtn {
    right: 16px;
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
  
  .mode-tabs {
    flex-direction: column;
  }
  
  .mode-tab:last-child {
    border-bottom: none;
  }
  
  .profile-controls {
    flex-direction: column;
  }
}

@media (min-width: 1001px) {
  .donate-btn, .join-btn { flex: none; min-width: 150px; }
}

@media (max-width: 1000px) {
  header .header-right { flex-direction: column; gap: 6px; width: 100%; }
  .donate-btn, .join-btn { width: 100%; font-size: 0.95rem; padding: 10px 0; }
}

@media (max-width: 480px) {
  header .header-right { flex-direction: column; gap: 6px; width: 100%; margin-top: 6px; }
  .donate-btn, .join-btn { font-size: 0.8rem; padding: 6px 0; }
  header h1 { font-size: 1rem; }
  header .version { font-size: 0.75rem; }
}

.mode-selector-container {
  margin-bottom: 16px;
}

.mode-selector {
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
}

.mode-tabs {
  display: flex;
  width: 100%;
}

.mode-tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: #9fb0d0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.mode-tab:first-child {
  border-right: 1px solid rgba(255,255,255,.1);
  border-radius: 12px 0 0 0;
}

.mode-tab:last-child {
  border-left: 1px solid rgba(255,255,255,.1);
  border-radius: 0 12px 0 0;
}

.mode-tab:hover {
  background: rgba(255,255,255,.05);
  color: #e6eef8;
}

.mode-tab.active {
  background: #10b981;
  color: #081226;
  font-weight: bold;
}

.mode-description {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #9fb0d0;
  border-top: 1px solid rgba(255,255,255,.05);
  background: rgba(255,255,255,.02);
}

/* NEW: Profile Management */
.profile-management {
  margin-top: 16px;
  margin-bottom: 16px;
}

.profile-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.profile-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: #e6eef8;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.profile-btn:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-1px);
}

.profile-btn.save {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.3);
  color: #10b981;
}

.profile-btn.save:hover {
  background: rgba(16,185,129,0.2);
}

.profile-btn.load {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.3);
  color: #3b82f6;
}

.profile-btn.load:hover {
  background: rgba(59,130,246,0.2);
}

/* NEW: Profile Modal */
.profile-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: linear-gradient(180deg,#071026,#0b1220);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.02);
}

.modal-header h3 {
  color: #10b981;
  font-size: 1.2rem;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: #9fb0d0;
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255,255,255,.1);
  color: #e6eef8;
}

.modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #e6eef8;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: #e6eef8;
  font-size: 14px;
  resize: vertical;
}

.form-group textarea {
  min-height: 80px;
  font-family: inherit;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #10b981;
  color: #081226;
}

.btn-primary:hover {
  background: #0ea673;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,.1);
  color: #e6eef8;
  border: 1px solid rgba(255,255,255,.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,.15);
  transform: translateY(-1px);
}

.changelog-btn {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.1);
  color: #10b981;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.changelog-btn:hover {
  background: rgba(16,185,129,0.2);
  color: #34d399;
  transform: translateY(-1px);
}

.seo-text {
  font-size: 0.9em;
  text-align: center;
  color: rgba(255,255,255,0.7);
  margin-top: 40px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}
.seo-text h2 {
  font-size: 1.2em;
  text-align: center;
  color: #10b981;
  margin-bottom: 8px;
}

  .content-wrapper {
  max-width: 80%;   /* largeur max du cadre */
  margin: 0 auto;     /* centre horizontalement */
  padding: 20px;
}

footer {
  bottom: 10px;
  left: 0;
  right: 0;
  padding:10px;
  text-align:center;
  font-size: 0.9rem;
  margin-top: 30px;
  flex-shrink:0;
}

.footer-container {
  text-align: center;  /* centre le contenu */
}

.footer-logo {
  display: block;
  margin: 0 auto 10px auto;  /* logo centré au-dessus du texte */
  height: auto;
  max-height: 80px;
  max-width: 80px;
}

/* Ship Tips Section */
.ship-tips {
  margin-top: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.04));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 8px;
  display: none;
  transition: all 0.3s ease;
}

.ship-tips.show {
  display: block;
  animation: slideInUp 0.3s ease-out;
}

.ship-tips-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ship-tips-header .icon {
  font-size: 1.1rem;
  color: #10b981;
}

.ship-tips-header h4 {
  color: #10b981;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.ship-tips-content {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #c9d6e8;
}

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

body.cockpit-mode .ship-tips {
  background: linear-gradient(135deg, rgba(0,255,204,0.08), rgba(0,255,204,0.04));
  border-color: rgba(0,255,204,0.2);
}

body.cockpit-mode .ship-tips-header h4,
body.cockpit-mode .ship-tips-header .icon {
  color: #00ffcc;
}

body.cockpit-mode .ship-tips-content {
  color: #99ddcc;
}
