/* General Body */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0f25;
  color: #fff;
}

/* Header */
header {
  text-align: center;
  padding: 30px 15px;
  background: linear-gradient(to right, #1e3a8a, #2563eb);
  color: #fff;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}
header h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: 1px;
  font-weight: 700;
}
header p {
  margin: 8px 0 20px;
  color: #dbeafe;
  font-size: 16px;
}
.search-bar {
  width: 90%;
  max-width: 450px;
  padding: 14px 20px;
  border-radius: 30px;
  border: none;
  font-size: 16px;
  background: #1e293b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
}
.search-bar:focus {
  outline: none;
  box-shadow: 0 0 15px #3b82f6;
}

/* Advertisement Banner */
.ad-banner {
  width: 90%;
  max-width: 728px;
  height: 100px;
  margin: 20px auto;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #94a3b8;
  background: linear-gradient(90deg, #1e293b, #334155);
  border: 1px dashed #475569;
  font-size: 18px;
}

/* Currency Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* Premium Currency Card */
.card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border-radius: 20px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  border: 1px solid #3b82f6;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 35px rgba(59,130,246,0.6);
  border-color: #60a5fa;
}
.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59,130,246,0.2), transparent 70%);
  opacity: 0;
  transition: 0.4s;
  pointer-events: none;
}
.card:hover::before {
  opacity: 1;
}

.flag {
  font-size: 40px;
  flex-shrink: 0;
  transform: scale(1);
  transition: transform 0.3s;
}
.card:hover .flag {
  transform: scale(1.2);
}

.card-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.code {
  font-weight: 700;
  font-size: 18px;
  color: #3b82f6;
}
.name {
  font-size: 14px;
  color: #cbd5e1;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  color: #94a3b8;
  border-top: 1px solid #334155;
  font-size: 14px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-content {
  background: #0b0f23;
  padding: 30px;
  border-radius: 25px;
  width: 90%;
  max-width: 500px;
  border: 2px solid #3b82f6;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
  animation: fadeIn 0.3s ease-in-out;
}
.close {
  position: absolute;
  top: 15px;
  right: 20px;
  cursor: pointer;
  font-size: 22px;
  color: #ef4444;
  transition: 0.3s;
}
.close:hover {
  transform: rotate(90deg);
}
.modal-content h2 {
  margin: 0;
  margin-bottom: 12px;
  color: #3b82f6;
}
.modal-content p {
  margin: 5px 0;
  font-size: 14px;
}
.modal-content a {
  color: #60a5fa;
  text-decoration: none;
}
.modal-content a:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  0% {opacity:0; transform: translateY(-20px);}
  100% {opacity:1; transform: translateY(0);}
}
