/* Define CSS variables for a modern 2024 appearance */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #FF9800;
    --background-color: #F5F5F5;
    --text-color: #333;
    --header-font: 'Roboto', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    border-bottom: 4px solid var(--secondary-color);
}

header h1 {
    font-family: var(--header-font);
    margin: 0;
}

header p {
    margin: 10px 0 0;
}

button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    margin-top: 20px;
    font-size: 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: darken(var(--secondary-color), 10%);
}

main {
    padding: 20px;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#main-content {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 1200px;
    margin: 20px 0;
}

#item-card-container, #game-drag-drop-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    width: 45%;
    border: 2px dashed var(--primary-color); /* Add dashed border */
    transition: background-color 0.3s ease, border-color 0.3s ease; /* Add transition for smooth effect */
}

.api-card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.api-card {
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 15px;
    margin: 10px 0;
    cursor: grab;
    transition: transform 0.2s ease;
}

.api-card:active {
    cursor: grabbing;
    transform: scale(1.05);
}

#discoveries {
    margin-top: 40px;
    width: 100%;
    max-width: 1200px;
}

#discoveries-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
}

#instructions {
    margin-top: 20px;
    font-style: italic;
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 10px;
    width: 100%;
}

/* Styles for the generated cards */
.card {
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 15px;
    margin: 10px;
    cursor: grab;
    transition: transform 0.2s ease;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.card span {
    display: block;
    margin-bottom: 10px;
    font-size: 24px;
}

.card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.card a:hover {
    text-decoration: underline;
}

.card.dragging {
    opacity: 0.5;
}

.drop-target-over {
    border: 2px dashed var(--secondary-color);
}

.discovery-card {
    /* Inherit styles from .card */
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 15px;
    margin: 10px;
    cursor: default; /* Set cursor to default */
    transition: transform 0.2s ease;
}

#game-drag-drop-container:hover {
    background-color: var(--background-color); /* Change background color on hover */
    border-color: var(--secondary-color); /* Change border color on hover */
}

#game-drag-drop-container.drop-target-over {
    background-color: var(--background-color); /* Ensure background color change on drag over */
    border-color: var(--secondary-color); /* Ensure border color change on drag over */
}

.placeholder-text {
    color: var(--text-color);
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 20px;
    opacity: 0.7;
}

/* Mobile styling for smartphones */
@media (max-width: 600px) {
    #main-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    #item-card-container, #game-drag-drop-container {
        width: 100%;
        margin-bottom: 20px;
    }

    .card {
        width: 30%; /* Make the cards smaller to fit three in a row */
        margin: 10px; /* Add some margin around the cards */
    }
}

.loading-indicator {
    color: var(--text-color);
    font-style: italic;
    text-align: center;
    margin: 20px 0;
}