* {

box-sizing: border-box;

margin: 0;

padding: 0;

font-family: Arial, sans-serif;

}

body {

background-color: #f4f4f4;

padding: 30px;

text-align: center;

}

h1 {

margin-bottom: 30px;

}

#crypto-container {

display: grid;

grid-template-columns: repeat(auto-fit, minmax(200px, 220px));

gap: 20px;

max-width: 900px;

margin: auto;

justify-content: center;

}

.crypto-card {

background: white;

padding: 20px;

border-radius: 10px;

box-shadow: 0 4px 10px rgba(0,0,0,0.1);

transition: transform 0.2s;

}

.crypto-card:hover {

transform: translateY(-5px);

}

.top-gainer {
    display: inline-block;
    background-color: #e11d48;
    color: #fff;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 12px;
}

.top-gainer-card {
  border: 2px solid gold;
}

.positive {
    color: green;

    font-weight: bold;

}

.negative {
    color: red;
    
    font-weight: bold;

}

#search {

width: 100%;

max-width: 400px;

padding: 12px 15px;

margin-bottom: 25px;

border-radius: 8px;

border: 1px solid #ddd;

font-size: 16px;

outline: none;

box-shadow: 0 2px 6px rgba(0,0,0,0.05);

transition: all 0.2s ease;

}

#search:focus {

border-color: #3b82f6;

box-shadow: 0 4px 10px rgba(0,0,0,0.1);

}

.search-container{
    display: flex;
    justify-content: center;
}

.sort-container{

display:flex;

justify-content:center;

margin-bottom:20px;

}

#sort{

padding:10px 12px;

border-radius:6px;

border:1px solid #ddd;

font-size:14px;

cursor:pointer;

}

footer {
  text-align: center;
  padding: 15px 0;
  border-top: 1px solid #000;
  margin-top: 40px;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  background-color: #000;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Tablet */

@media (max-width: 768px) {

#crypto-container {

grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));

}

#search {

max-width: 300px;

}

}

/* Mobile */

@media (max-width: 480px) {

h1 {

font-size: 24px;

}

#crypto-container {

grid-template-columns: 1fr;

}

.crypto-card {

padding: 15px;

}

#search {

max-width: 250px;

}

}