/* URL Shortener — golden luxury */

.tool-page-shell .tool-container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0 0;
}

.shortener-form {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
  border-radius: 15px;
  padding: 35px;
  margin-bottom: 35px;
  box-shadow: 0 14px 36px -24px rgba(94, 65, 30, 0.35);
  border: 1px solid rgba(145, 103, 48, 0.2);
}

.input-group {
  margin-bottom: 30px;
}

.input-group label {
  display: block;
  color: #4f3a24;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.url-input-container {
  display: flex;
  gap: 15px;
  align-items: stretch;
}

#longUrl {
  flex: 1;
  padding: 16px 20px;
  font-size: 1rem;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.26);
  border-radius: 8px;
  color: #4a351f;
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s ease;
}

#longUrl:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.14);
}

#longUrl::placeholder {
  color: #8c7558;
}

#shortenBtn {
  padding: 16px 25px;
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: visible;
}

#shortenBtn::after {
  display: none;
}

#shortenBtn:hover {
  background: linear-gradient(180deg, #c89a4a 0%, #aa7d34 100%);
  transform: none;
  box-shadow: none;
}

.service-selection {
  margin-top: 25px;
}

.service-selection > label {
  display: block;
  color: #4f3a24;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.service-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.service-option {
  background: rgba(255, 252, 246, 0.95);
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-option:hover {
  border-color: rgba(171, 124, 52, 0.45);
  background: rgba(182, 138, 58, 0.08);
}

.service-option input[type="radio"] {
  display: none;
}

.service-option input[type="radio"]:checked + .service-name {
  color: #7a5526;
}

.service-option input[type="radio"]:checked ~ * {
  color: #4a351f;
}

.service-option:has(input[type="radio"]:checked) {
  border-color: #ab7c34;
  background: rgba(182, 138, 58, 0.12);
}

.service-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #4f3a24;
  transition: color 0.3s ease;
}

.service-desc {
  font-size: 0.9rem;
  color: rgba(88, 64, 38, 0.65);
  transition: color 0.3s ease;
}

.results-section {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
  border-radius: 15px;
  padding: 35px;
  margin-bottom: 35px;
  border: 1px solid rgba(145, 103, 48, 0.2);
}

.result-card h3 {
  color: #5e4329;
  font-size: 1.4rem;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-card h3 i {
  color: #9a7a3a;
}

.url-result {
  margin-bottom: 20px;
}

.url-result label {
  display: block;
  color: #4f3a24;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 1rem;
}

.url-display {
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.2);
  border-radius: 8px;
  padding: 15px;
  color: #7a5526;
  font-family: 'Courier New', monospace;
  word-break: break-all;
  position: relative;
}

.shortened-url {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copy-btn {
  background: rgba(182, 138, 58, 0.12);
  border: 1px solid rgba(145, 103, 48, 0.35);
  color: #7a572c;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 15px;
  flex-shrink: 0;
}

.copy-btn.copied {
  animation: copyPulse 0.6s ease;
  box-shadow: 0 0 0 2px rgba(171, 124, 52, 0.35);
}

.copy-btn.copied svg {
  display: inline-block;
  vertical-align: middle;
}

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

.copy-btn:hover {
  background: rgba(182, 138, 58, 0.22);
}

.result-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  position: relative;
  overflow: hidden;
  min-width: 140px;
  box-sizing: border-box;
}

.btn-primary,
.btn-secondary,
.btn-warning {
  position: relative;
  overflow: hidden;
}

.btn-primary::after,
.btn-secondary::after,
.btn-warning::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.12);
  transition: left 0.4s;
}

.btn-primary:hover::after,
.btn-secondary:hover::after,
.btn-warning:hover::after {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #c89a4a 0%, #aa7d34 100%);
  transform: scale(1.05);
}

.btn-secondary {
  background: transparent;
  color: #7a572c;
  border: 2px solid rgba(145, 103, 48, 0.4);
}

.btn-secondary:hover {
  background: rgba(182, 138, 58, 0.12);
  color: #5e4329;
  transform: scale(1.05);
}

.loading-state {
  text-align: center;
  padding: 40px;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(248, 238, 222, 0.95));
  border-radius: 15px;
  margin-bottom: 35px;
  border: 1px solid rgba(145, 103, 48, 0.15);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(145, 103, 48, 0.2);
  border-top: 4px solid #ab7c34;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.loading-state p {
  color: rgba(88, 64, 38, 0.72);
  font-size: 1.1rem;
}

.error-state {
  text-align: center;
  padding: 40px;
  background: linear-gradient(180deg, rgba(255, 245, 242, 0.98), rgba(248, 228, 222, 0.95));
  border-radius: 15px;
  margin-bottom: 35px;
  border: 1px solid rgba(184, 74, 61, 0.25);
}

.error-card i {
  color: #c94a3a;
  font-size: 3rem;
  margin-bottom: 15px;
}

.error-card h3 {
  color: #b84a3d;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.error-card p {
  color: #5c4034;
  margin-bottom: 25px;
  line-height: 1.6;
}

.warning-state {
  text-align: center;
  padding: 40px;
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.98), rgba(248, 236, 210, 0.95));
  border-radius: 15px;
  margin-bottom: 35px;
  border: 1px solid rgba(200, 150, 60, 0.35);
}

.warning-card i {
  color: #c48a1e;
  font-size: 3rem;
  margin-bottom: 15px;
}

.warning-card h3 {
  color: #a67418;
  margin-bottom: 15px;
  font-size: 1.3rem;
  font-weight: 600;
}

.warning-card p {
  color: #5c4034;
  margin-bottom: 25px;
  line-height: 1.6;
  text-align: left;
}

.warning-url {
  margin: 25px 0;
  text-align: left;
}

.warning-url label {
  display: block;
  color: #4f3a24;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 1rem;
}

.warning-note {
  margin-top: 20px;
  padding: 15px;
  background: rgba(200, 150, 60, 0.12);
  border-left: 4px solid #c48a1e;
  border-radius: 6px;
}

.warning-note p {
  color: #8a6214;
  font-size: 0.9rem;
  margin: 0;
  text-align: left;
  line-height: 1.5;
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

.toast.success {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
}

.toast.error {
  background: #c94a3a;
  color: #fff;
}

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

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 50px;
  margin-bottom: 0;
}

.tool-page-shell .tool-container > *:last-child {
  margin-bottom: 0 !important;
}

.feature-card {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
  border: 1px solid rgba(145, 103, 48, 0.18);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(171, 124, 52, 0.4);
  box-shadow: 0 12px 32px -20px rgba(94, 65, 30, 0.3);
}

.feature-card i {
  font-size: 2.5rem;
  color: #b98b3b;
  margin-bottom: 20px;
}

.feature-card h3 {
  color: #4f3a24;
  font-size: 1.3rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.feature-card p {
  color: rgba(88, 64, 38, 0.72);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .tool-container {
    padding: 0 0;
  }

  .shortener-form {
    padding: 25px 20px;
  }

  .url-input-container {
    flex-direction: column;
    gap: 15px;
  }

  #shortenBtn {
    justify-content: center;
  }

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

  .results-section {
    padding: 25px 20px;
  }

  .shortened-url {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .copy-btn {
    margin-left: 0;
    align-self: flex-start;
  }

  .result-actions {
    flex-direction: column;
  }

  .btn-secondary {
    border: 1px solid rgba(145, 103, 48, 0.4);
  }

  .features-grid {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }

  .toast {
    top: auto;
    bottom: 100px;
    left: 20px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  .shortener-form {
    padding: 20px 15px;
  }

  .results-section {
    padding: 20px 15px;
  }

  .feature-card {
    padding: 25px 20px;
  }

  #longUrl {
    padding: 14px 16px;
  }

  #shortenBtn {
    padding: 14px 20px;
  }
}
