@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
body {
    font-family: 'Inter', sans-serif;
    background-color: #333;
    color: #eee;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><polygon fill="#444" points="0 50 50 0 100 50 50 100 0 50"/><polygon fill="#555" points="50 0 100 50 50 100"/><polygon fill="#666" points="50 0 50 100 0 50"/><polygon fill="#777" points="0 50 100 50 50 100"/></svg>');
    background-size: 200px 200px;
}
.game-container {
    background-color: #333;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #374151;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
    position: relative;
}
canvas {
    background-color: #555;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
}
#coupon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0.50;
    text-align: center;
    padding: 2.5rem;
}
#coupon-overlay p {
    font-size: 0.8rem;
    color: #ccc;
    margin: 0.25rem 0;
    line-height: 1.4;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.hud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}
.badge {
    background-color: #555;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-grow: 1;
    text-align: center;
}
#start-screen, #end-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.start-box, .end-box {
    background-color: #1a202c;
    color: #e5e7eb;
    padding: 2.5rem;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 2px solid #374151;
    max-width: 90%;
    word-break: break-word;
}
.start-box h1, .end-box h1 {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #6ee7b7;
    margin-bottom: 0.5rem;
}
.start-box p, .end-box p {
    font-size: 1.125rem;
    color: #9ca3af;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
#start-subtitle {
    font-size: 1.125rem;
    color: #b8c1ec;
    font-weight: bold;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    text-decoration: none;
}
.primary-button {
    background-color: #2563eb;
    color: #fff;
}
.primary-button:hover {
    background-color: #1e40af;
    box-shadow: 6px 10px rgba(0, 0, 0, 0.2);
}
.secondary-button {
    background-color: #6b7280;
    color: #fff;
    margin-top: 1rem;
}
.secondary-button:hover {
    background-color: #4b5563;
    box-shadow: 6px 10px rgba(0, 0, 0, 0.2);
}
.controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    width: 100%;
}
.control-button {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.control-button .arrow {
    font-size: 20px;
    line-height: 1;
    margin-right: 6px;
}
.control-button:hover {
    background-color: #6b7280;
}
.slot {
    background-color: #777;
    color: #fff;
    border-radius: 5px;
    padding: 15px 20px;
    font-size: 18px;
    text-align: center;
    box-shadow: 1px 2px rgba(0, 0, 0, 0.3);
}
.piece {
    background-color: #00aaff;
    color: #fff;
    border-radius: 5px;
    padding: 15px;
    font-size: 16px;
    text-align: center;
    box-shadow: 2px 4px rgba(0, 0, 0, 0.5);
}
.speech {
    position: absolute;
    background-color: #fff;
    color: #333;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 14px;
    box-shadow: 2px 4px rgba(0, 0, 0, 0.3);
}
.coupon-box {
    background-color: #2d3748;
    padding: 1.5rem;
    border-radius: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    border: 1px dashed #4a5568;
}
.coupon-label {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #c4b5fd;
}
.coupon-code {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.1em;
    word-break: break-all;
    user-select: text;
}
#copyButton {
    font-size: 1rem;
    padding: 0.6rem 1rem;
}