/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header Styles */
header {
    position: relative; /* For positioning the language switcher */
    background-color: #fff;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0 0 10px 0;
    font-size: 2em;
    color: #1c1e21;
}

header p {
    margin: 0;
    color: #606770;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* Language Switcher Styles */
#lang-switcher-container {
    position: absolute;
    top: 20px;
    right: 20px;
}

#lang-switcher {
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 14px;
}

/* Main Content Styles */
main {
    width: 90%;
    max-width: 960px;
    margin: 20px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button {
    display: block;
    margin: 20px auto;
    padding: 12px 25px;
    font-size: 18px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Ad Placeholder Style */
.adsbygoogle {
    margin: 20px auto;
    text-align: center;
}

/* Card Container & Card Styles (mostly unchanged) */
#cardContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fafafa;
    min-height: 200px;
    margin-bottom: 30px;
}

.card {
    width: 70px;
    height: 100px;
    border: 1px solid #ccc;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 5px;
    box-sizing: border-box;
}

.card.red {
    color: #d92d2d;
}

@keyframes shuffleShake {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-5px, 0) rotate(-5deg); }
    50% { transform: translate(5px, 0) rotate(5deg); }
    75% { transform: translate(-5px, 0) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.card.shuffling {
    animation: shuffleShake 0.5s ease-in-out;
}

.card .rank {
    font-size: 1.2em;
}

.card .suit {
    font-size: 1.5em;
}

/* Content Section Styles */
.content-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 20px;
}

.content-section p {
    max-width: 680px;
    margin: 0 auto 15px auto;
}

/* Footer Styles */
footer {
    width: 100%;
    padding: 20px;
    text-align: center;
    background-color: #fff;
    border-top: 1px solid #ddd;
    margin-top: 20px;
    color: #606770;
    font-size: 0.9em;
}