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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  background-color: #f8f9fa;
  color: #1d1d1f;
  line-height: 1.6;
  font-size: 16px;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e7;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a {
  text-decoration: none;
  color: #1d1d1f;
  font-weight: 500;
  font-size: 15px;
  margin-right: 20px;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #0071e3;
}

/* Login Container */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f7 100%);
}

.login-box {
  background-color: #ffffff;
  padding: 48px;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 380px;
}

.login-box h1 {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: #1d1d1f;
  letter-spacing: -0.5px;
}

.login-box p {
  text-align: center;
  color: #86868b;
  margin-bottom: 32px;
  font-size: 15px;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input[type="text"],
input[type="password"] {
  padding: 12px 16px;
  border: 1px solid #e5e5e7;
  border-radius: 10px;
  font-size: 16px;
  background-color: #f5f5f7;
  color: #1d1d1f;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #0071e3;
  background-color: #ffffff;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: #a1a1a6;
}

#shortenForm {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

#shortenForm .form-control,
#shortenForm .shorten-btn {
  height: 52px;
}

#shortenForm .shorten-btn {
  margin-top: 0 !important;
  padding: 0 20px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#shortenForm input {
  flex: 1;
}

#shortenForm button {
  white-space: nowrap;
  background-color: #495057;
  border-color: #495057;
  color: #fff;
}

#shortenForm button:hover {
  background-color: #3d444d;
  border-color: #3d444d;
}

.btn-dark {
  background-color: #495057 !important;
  border-color: #495057 !important;
}

.btn-dark:hover {
  background-color: #3d444d !important;
  border-color: #3d444d !important;
}

/* Buttons */
button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 10px;
  font-size: 15px;
}

button[type="submit"] {
  margin-top: 8px;
  padding: 12px 20px;
  background-color: #0071e3;
  color: #ffffff;
}

button[type="submit"]:hover {
  background-color: #0077ed;
  box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
}

button[type="submit"]:active {
  background-color: #0066cc;
}

.btn-copy,
.btn-delete {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 8px;
}

.btn-copy {
  background-color: rgba(13, 110, 253, 0.15);
  color: #0d6efd;
  border: none;
}

.btn-copy:hover {
  background-color: rgba(13, 110, 253, 0.25);
}

.btn-delete {
  background-color: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border: none;
}

.btn-delete:hover {
  background-color: rgba(220, 53, 69, 0.25);
}

/* Dashboard */
.container,
.dashboard-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #1d1d1f;
  letter-spacing: -0.5px;
}

#result {
  background-color: #f5f5f7;
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  border-left: 4px solid #0071e3;
}

#result.hidden {
  display: none;
}

#shortUrl {
  font-weight: 600;
  color: #0071e3;
  word-break: break-all;
}

/* Tabelle */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 32px;
}

.links-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.links-table th {
  background-color: #f5f5f7;
  color: #1d1d1f;
  font-weight: 600;
  padding: 12px 8px;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #e5e5e7;
}

.links-table td {
  padding: 14px 8px;
  border-bottom: 1px solid #e5e5e7;
  color: #1d1d1f;
}

.links-table tr:hover {
  background-color: #f9f9fb;
}

.links-table th:nth-child(4),
.links-table td:nth-child(4),
.links-table th:nth-child(5),
.links-table td:nth-child(5) {
  text-align: center;
  vertical-align: middle;
}

.links-table td:nth-child(5) {
  white-space: nowrap;
}

.url-cell {
  cursor: help;
  color: #0d6efd;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-tooltip {
  position: fixed;
  z-index: 9999;
  display: none;
  max-width: 600px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #212529;
  color: #fff;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.url-tooltip.show {
  display: block;
}

/* Error Messages */
p[style*="color"] {
  margin-top: 12px;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .login-box {
    padding: 32px 24px;
  }

  h2 {
    font-size: 24px;
  }

  nav {
    flex-direction: column;
    gap: 12px;
  }

  nav a {
    margin-right: 0;
  }

  .links-table {
    font-size: 14px;
  }

  .links-table th,
  .links-table td {
    padding: 10px 6px;
  }
}

.min-vh-100 {
  min-height: 100vh;
}