* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;

    background: #f5f5f5;
    color: #222;

    transition:
        background 0.3s,
        color 0.3s;
}


/* HEADER */

header {
    text-align: center;
    padding: 70px 20px;

    background: #222;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}


/* HOVUDINNHALD */

main {
    max-width: 1000px;
    margin: auto;
    padding: 40px 20px;
}

section {
    margin-bottom: 70px;
}

h2 {
    margin-bottom: 25px;
}


/* KNAPPAR */

button {
    border: none;
    padding: 12px 20px;
    border-radius: 8px;

    cursor: pointer;

    font-size: 1rem;

    transition:
        transform 0.2s,
        opacity 0.2s;
}

button:hover {
    transform: translateY(-3px);
    opacity: 0.85;
}

.primary {
    background: #0077ff;
    color: white;
}

.secondary {
    background: #555;
    color: white;
}

.danger {
    background: #e63946;
    color: white;
}

.buttons {
    display: flex;
    gap: 10px;
}


/* TELJAR */

.counter {
    display: flex;
    align-items: center;
    gap: 20px;
}

.counter span {
    font-size: 2rem;
    font-weight: bold;
}


/* KORT */

.cards {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(200px, 1fr));

    gap: 20px;
}

.card {
    background: white;

    padding: 25px;

    border-radius: 12px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-8px);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.15);
}


/* INPUT */

input {
    padding: 12px;

    border: 1px solid #ccc;
    border-radius: 8px;

    font-size: 1rem;

    margin-right: 5px;
}

#message {
    font-size: 1.2rem;
    font-weight: bold;
}


/* ANIMASJON */

.animation-area {
    height: 120px;

    background: #ddd;

    border-radius: 12px;

    position: relative;
    overflow: hidden;
}

.ball {
    width: 50px;
    height: 50px;

    background: #e63946;

    border-radius: 50%;

    position: absolute;

    top: 35px;

    animation: moveBall 3s infinite alternate ease-in-out;
}

@keyframes moveBall {

    from {
        left: 10px;
        transform: rotate(0deg);
    }

    to {
        left: calc(100% - 60px);
        transform: rotate(360deg);
    }

}


/* DARK MODE */

.dark {
    background: #111;
    color: #eee;
}

.dark .card {
    background: #222;
}

.dark .animation-area {
    background: #333;
}


/* FOOTER */

footer {
    text-align: center;

    padding: 30px;

    background: #222;
    color: #aaa;
}