* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #333;
    width: 100%;
    overflow-x: hidden; /* Sprečava vodoravno skrolovanje na mobilnom */
}

/* HEADER */
.header {
    display: flex;
    flex-direction: column; /* Na mobilnom idu jedan ispod drugog */
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    color: white;
    gap: 15px;
}

.header h1 {
    font-size: 22px;
}

/* Navigacioni linkovi koji izgledaju kao dugmići */
.nav-buttons {
    display: flex;
    gap: 10px;
}

.nav-link-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: white;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
    display: inline-block;
}

.nav-link-btn:hover {
    background: #e6e6e6;
}

/* CONTAINER */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* CARD - Prilagođen za sve ekrane */
.card {
    width: 100%;
    max-width: 400px; /* Neće biti širi od ovoga na desktopu */
    background: white;
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.card h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* INPUT - Veći za lakši dodir na mobilnom */
input {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    outline: none;
    font-size: 16px; /* Sprečava auto-zoom na iPhone uređajima */
}

/* BUTTONS - Responzivni raspored */
.buttons {
    display: flex;
    flex-direction: column; /* Jedan ispod drugog na mobilnom */
    gap: 10px;
    margin-bottom: 15px;
}

.buttons button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: #4facfe;
    color: white;
    font-size: 16px;
    font-weight: bold;
    transition: 0.3s;
}

.buttons button:hover {
    background: #1f8fff;
}

/* RESULTS LIST */
#resultsList {
    text-align: left;
    margin-bottom: 15px;
}

.result-item {
    padding: 12px;
    margin-bottom: 6px;
    background: #f1f1f1;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.result-item:hover {
    background: #ddd;
}

/* RESULT BOX */
.result-box {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 12px;
    margin-top: 10px;
}

.result-box p {
    font-size: 14px;
    margin-bottom: 5px;
}

.result-box h2 {
    margin: 5px 0;
    font-size: 2rem;
}

/* --- MEDIA QUERIES ZA VEĆE EKRANE (Desktop/Tablet) --- */

@media (min-width: 600px) {
    .header {
        flex-direction: row; /* Vraća u jedan red */
        padding: 20px 40px;
    }

    .header h1 {
        font-size: 24px;
    }

    .buttons {
        flex-direction: row; /* Dugmići Search i Clear stoje jedan pored drugog */
    }

    .container {
        padding: 40px;
    }
}