body {
    font-family: 'Georgia', serif;
    background-color: #1e1e1e;
    color: #f0e6d2;
    padding: 2rem;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

h2 {
    margin-top: 2rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

a {
    color: #a6e3a1;
    display: inline-block;
    margin-bottom: 1rem;
}

ul {
    padding-left: 1.2rem;
}

.card, .card-entry, .rule-builder, .form-container {
    background-color: #2d2d2d;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.card:hover, .card-selection:hover {
    transform: scale(1.02);
    background-color: #4d4d4d !important;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-entry h3 {
    margin: 0;
    font-size: 1.25rem;
}

.card-details {
    font-size: 0.95rem;
    color: #ccc;
}

.section {
    margin-bottom: 2rem;
}

.plus-card {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.back-button {
    margin-bottom: 2rem;
}

.modal {
		display: none;
		position: fixed;
		z-index: 100;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.7);
		/* modal scroll fix */
		overflow-y: auto;
	}

	.modal-content {
		background-color: #2d2d2d;
		margin: 4% auto;
		padding: 2rem;
		border-radius: 8px;
		width: 80%;
		max-width: 800px;
		box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
	}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #444;
}

.modal-title {
    font-size: 1.5rem;
    margin: 0;
}

.close {
    color: #aaa;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #f0e6d2;
}

.form-group, label {
    margin-bottom: 1rem;
    display: block;
}

textarea, input, .upload-btn {
    font-family: inherit;
    background-color: #333;
    color: #f0e6d2;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

button {
    cursor: pointer;
    margin-top: 1rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.5rem;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #f0e6d2;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    background: #1e1e1e;
    border: 1px solid #555;
    margin-bottom: 1rem;
}

/* styled file upload with custom button */
input[type="file"] {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-family: inherit;
    background-color: #333;
    color: #f0e6d2;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

input[type="file"]::file-selector-button {
    background-color: #444;
    color: #f0e6d2;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    cursor: pointer;
    font-weight: bold;
}

input[type="file"]::file-selector-button:hover {
    background-color: #555;
}

/* fallback default for unclassified buttons */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.9rem;
    background-color: #a6e3a1;
    color: #1e1e1e;
    margin-right: 0.5rem;
    margin-bottom: 1.5%;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #3e8e41;
}

.btn-danger {
    background-color: #d32f2f;
    color: white;
}

.btn-danger:hover {
    background-color: #b71c1c;
}

.btn-secondary {
    background-color: #444;
    color: #f0e6d2;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 1rem;
}

.rule-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.rule-field,
.rule-operator,
.rule-value {
    padding: 0.5rem;
    margin-right: 0.5rem;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #f0e6d2;
}

.active-rule {
    display: flex;
    align-items: center;
    background-color: #3d3d3d;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.active-rule-text {
    flex-grow: 1;
}

.remove-rule {
    color: #ff6b6b;
    cursor: pointer;
    margin-left: 1rem;
}

.color-option {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.5rem;
    cursor: pointer;
    border: 1px solid #444;
}

.color-option.selected {
    border: 2px solid #f0e6d2;
}

.color-W { background-color: #f9f6d5; }
.color-U { background-color: #0e68ab; }
.color-B { background-color: #000000; }
.color-R { background-color: #d3202a; }
.color-G { background-color: #00733e; }

#cardGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #a6e3a1 #2d2d2d;
}

#cardGrid::-webkit-scrollbar {
    width: 8px;
}

#cardGrid::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

#cardGrid::-webkit-scrollbar-thumb {
    background-color: #a6e3a1;
    border-radius: 4px;
}

.quantity-control {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.quantity-input {
    width: 50px;
    margin: 0 5px;
    text-align: center;
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #f0e6d2;
    padding: 0.25rem;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #444;
    color: #f0e6d2;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.quantity-btn:hover {
    background-color: #555;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #a6e3a1;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    position: relative;
    margin-right: 0.5rem;
}

input[type="checkbox"]:checked {
    background-color: #a6e3a1;
}

input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    color: #1e1e1e;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.response, #jsonPreview {
    background-color: #262626;
    padding: 1rem;
    border-radius: 4px;
    white-space: pre-wrap;
    margin-top: 1rem;
    /* display: none; */
}

#jsonPreview pre {
    margin: 0;
    white-space: pre-wrap;
}

.error {
    color: #ff6b6b;
    text-align: center;
}

.success {
    color: #a6e3a1;
    text-align: center;
}

.toggle {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}
