/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    text-align: center;
}

/* Container Styles */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    min-height: 400px; /* Default minimum height */
    transition: height 0.3s ease;
}

/* Header Styles */
h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Settings Section */
#settings {
    margin-bottom: 20px;
}

/* Game Board Styles */
.game-board {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Card Styles */
.cards {
    width: 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto; /* Allow scrolling if content overflows */
}

.card {
    width: 80%;
    margin: 10px 0;
    background-color: #007bff;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    height: 50px;
    transition: background-color 0.3s, transform 0.3s;
    transform-style: preserve-3d;
}

.card:hover {
    background-color: #0056b3;
}

.card.revealed {
    background-color: #28a745; /* Change background color on reveal */
}

.card.matched {
    background-color: #ffc107;
}

/* Score and Message Styles */
#score {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
}

#message {
    margin-top: 10px;
    font-size: 18px;
    color: #555;
    font-weight: bold;
}

/* Reset Button Styles */
#reset-button {
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: block;
}

#reset-button:hover {
    background-color: #0056b3;
}

/* Practice List and Item Styles */
.practice-list {
    margin-top: 20px;
    font-size: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto; /* Allow scrolling if content overflows */
}

.practice-item {
    display: flex;
    justify-content: space-between;
    width: 80%;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin: 5px auto 15px; /* Centering the item horizontally and adding bottom margin */
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}

.practice-item:hover {
    background-color: #e9e9e9;
}

/* Word Column Styles */
.word-column {
    flex: 1;
    margin-right: 10px;
    font-weight: bold;
}

/* Input Column Styles */
.input-column {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Aligns the content to the end of the column */
}

/* Input Field Styles */
.input-column input {
    margin-right: 10px;
    padding: 5px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Icon Column and Icon Styles */
.icon-column {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin-right: 50px; /* Increased space between icons and Korean word */
}

.icon-column img {
    cursor: pointer;
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

/* Specific Style for Search Icon */
.icon-column img.search-icon {
    margin-left: 5px;
}

/* Check Icon Styles */
.input-column img.check-icon {
    cursor: pointer;
    width: 20px;
    height: 20px;
    margin-right: 0; /* Remove or set margin to 0 */
}

/* swal Styles */
.custom-swal-popup {
    text-align: center; /* Center all content inside the popup */
}

.custom-swal-title {
    text-align: center; /* Center the title text */
}

.custom-swal-content {
    text-align: center; /* Center the content text */
}

.custom-swal-button {
    text-align: center; /* Center the text within the button */
    display: inline-block; /* Use inline-block for better alignment */
    margin: 0 auto; /* Center the button within the popup */
}


/* Responsive Styles for Mobile Devices */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .game-board {
        flex-direction: column;
    }

    .cards {
        width: 100%;
    }

    .card {
        width: 90%;
        font-size: 16px;
    }

    .practice-item {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .word-column, .input-column, .icon-column {
        width: 100%;
        margin-right: 0;
    }

    .input-column {
        margin-top: 10px;
    }

    .icon-column {
        justify-content: flex-start;
        margin-top: 10px;
        margin-right: 0;
    }

    #reset-button {
        width: 100%;
    }

    .custom-swal-popup {
        width: 90%; /* Make popup smaller on mobile */
        font-size: 14px; /* Adjust font size for readability */
        padding: 20px; /* Adjust padding */
    }

    .custom-swal-title {
        font-size: 18px; /* Adjust title font size */
        margin-bottom: 8px; /* Adjust margin */
    }

    .custom-swal-content {
        font-size: 14px; /* Adjust content font size */
        margin-bottom: 15px; /* Adjust spacing */
    }

    .custom-swal-button {
        width: 100%; /* Make button full width */
        font-size: 16px; /* Adjust button font size */
    }
}
