body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('images/background.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    color: #333;
}

.centered {
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

header {
    text-align: center;
    margin-bottom: 20px;
}

.title-image {
    max-width: 100%;
    height: auto;
}

.guide {
    text-align: center;
}

.tb{
    font-weight: bold;
    background-color: rgb(201, 255, 255);
}

.yb{
    font-weight: bold;
    background-color: rgb(255, 255, 201);
}

.gb{
    font-weight: bold;
    background-color: rgb(201, 255, 201);
}

.nb{
    font-weight: bold;
    background-color: rgb(255, 201, 201);
}

.dolltable{
	border-collapse:collapse;
	border-color:black;
	border-style:solid;
	border-width:1px;
	border-spacing:0;
	}
	.dolltable th{
	border-color:black;
	border-style:solid;
	border-width:1px;
	}
	.dolltable td{
	border-color:black;
	border-style:solid;
	border-width:1px;
	}

.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: bold;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 150px;
}

#filter-button {
    padding: 10px 25px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.result-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.result-card .thumbnail {
    width: 100%;
    height: auto;
    display: block;
}

.card-content {
    padding: 15px;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
}

.card-title {
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.card-warning {
    color: #d9534f;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.variant-selector {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.variant-selector label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #495057;
    font-size: 0.9em;
}

.variant-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    font-size: 0.9em;
    transition: border-color 0.3s ease;
}

.variant-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.card-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
}

.btn {
    display: inline-block;
    text-align: center;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.3s ease;
    font-size: 0.9em;
}

.btn:hover {
    opacity: 0.8;
}

.btn-download-png {
    background-color: #28a745;
    color: white;
}

.btn-download-webp {
    background-color: #17a2b8;
    color: white;
}

.btn-details {
    grid-column: 1 / -1;
    background-color: #6c757d;
    color: white;
    cursor: pointer;
    border: none;
}

.details-content {
    display: none;
    background-color: #f1f1f1;
    padding: 15px;
    margin-top: 10px;
    border-radius: 4px;
}

.details-content p {
    margin: 0 0 5px 0;
}
.details-content p:last-child {
    margin-bottom: 0;
}

.message {
    text-align: center;
    font-size: 1.2em;
    color: #666;
    padding: 40px;
}

.result-card .thumbnail {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.result-card .thumbnail:hover {
    opacity: 0.85;
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease; 
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}