
:root {
    --bg-color: #280130;
    --text-main: #ffffff;
    --color-title: #FF8EF0;
    --color-green: #91CF5F;
    --color-blue: #7EB3DB;
    --color-purple: #7e22ce; 
    --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color) !important;
    color: var(--text-main);
    margin: 0;
    font-family: var(--font-stack);
    padding: 20px;
    height: 100vh;
    box-sizing: border-box;
}

.main-container {
    max-width: 32rem; 
    margin: 0 auto;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow-xl */
}

.main-title {
    font-size: 1.875rem; 
    line-height: 2.25rem;
    font-weight: 700;
    text-align: center;
    color: var(--color-title);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07));
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border-width: 0;
}


.input-group {
    margin-bottom: 1.5rem;
}

.card-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid black;
    border-radius: 0.375rem;
    font-size: 1.125rem; 
    font-weight: 600;
    color: black;
    background-color: white;
    box-sizing: border-box; 
    outline: none;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.card-input:focus {
    box-shadow: 0 0 0 2px var(--color-purple); 
    border-color: transparent;
}


#bingo-grid-editor {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 2px solid black;
    background-color: black;
    gap: 2px;
    margin-bottom: 2rem;
    padding: 4px;
    border-radius: 0.375rem;
}


.btn-generate {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 700;
    color: black;
    background-color: var(--color-green);
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-generate:hover {
    background-color: var(--color-blue);
}

.btn-icon {
    margin-right: 0.5rem;
}


.share-container {
    margin-top: 1rem;
    background-color: black;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #4b5563; 
}

.share-text {
    text-align: center;
    font-size: 0.875rem;
    color: white;
    margin-bottom: 0.5rem;
}

.share-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #6b7280;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    text-align: center;
    color: black;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
}

.btn-test {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background-color: var(--color-purple);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-test:hover {
    background-color: #6b21a8; 
}


.hidden {
    display: none !important;
}

#status-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.status-red { color: #f87171; }   
.status-green { color: #4ade80; } 
.status-blue { color: #93c5fd; }  
.status-gray { color: #9ca3af; }  


.bingo-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid black;
    padding: 4px;
    height: 120px;
    overflow: hidden;
    position: relative;
    color: black;
    font-weight: bold;
}

.bingo-cell img {
    width: 100%;
    max-height: 60px;
    height: auto;
    min-height: 0;
    flex-shrink: 1;
    object-fit: contain;
    margin-bottom: 4px;
}

.bingo-cell textarea {
    width: 100%;
    text-align: center;
    border: none;
    outline: none;
    font-size: 0.75rem;
    line-height: 1rem;
    flex-shrink: 0;
    padding: 2px 0;
    margin: 0;
    resize: none;
    background-color: transparent;
    color: black;
    font-weight: 600;
    overflow: hidden;
    font-family: inherit;
}

.bingo-cell textarea::placeholder {
    color: rgba(0, 0, 0, 0.6);
    opacity: 1;
}

.bingo-cell input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


.bingo-cell .upload-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 1px solid white;
    font-size: 1.1rem;
    transition: background-color 0.2s;
}

.bingo-cell .upload-btn:hover { background-color: black; }

.bingo-cell .remove-img-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    background-color: #EF4444;
    color: white;
    transition: background-color 0.2s ease;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 1px solid black;
    font-size: 1rem;
    padding: 0;
    z-index: 10;
}

.bingo-cell .remove-img-btn:hover {
    background-color: #B91C1C;
    border-color: white;
}

.free-space {
    background-color: black !important;
    color: white !important;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.3);
}

.free-space textarea {
    background-color: black !important;
    color: white !important;
    flex-grow: 0;
    height: auto;
}
.free-space textarea::placeholder { color: rgba(255, 255, 255, 0.8); }