html, body {
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100%;
}

a {
    color: #38B6FF;
    display: inline-block;
    max-width: 100%;
}

h1, h2, h3 {
    margin: 0;
    padding: 6px 0;
}

/* ── Layout ── */
.page-content {
    padding: 55px 0 80px;
}

.site-header {
    background-color: #38B6FF;
    border-bottom: 2px solid #000;
    height: 190px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: visible;
    padding-top: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.site-header a {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.site-header-img {
    max-height: 266px;
    max-width: 90%;
    object-fit: contain;
    position: relative;
    z-index: 3;
}

/* ── Main container ── */
.form-container-main {
    background-color: #2a2a2a;
    border-radius: 12px;
    width: 95%;
    max-width: 800px;
    padding: 14px;
    text-align: left;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

/* ── Cards ── */
.card {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #38B6FF;
    margin-bottom: 6px;
}

.card-meta {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 8px;
}

/* ── Forms ── */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    padding: 10px;
    background-color: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    margin-bottom: 10px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"] {
    height: 48px;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

label {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 4px;
}

input[type="submit"],
button {
    height: 48px;
    font-size: 1rem;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0 16px;
}

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

.btn-primary {
    background-color: #38B6FF;
    color: #000;
    font-weight: bold;
}

.btn-primary:hover {
    background-color: #55c8ff;
}

.btn-danger {
    background-color: #c0392b;
    color: #fff;
}

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

.btn-small {
    height: 34px;
    font-size: 0.85rem;
    padding: 0 10px;
}

.btn-full {
    width: 100%;
}

/* ── Login ── */
.login-container {
    max-width: 360px;
    margin: 60px auto 0;
}

.login-container h2 {
    margin-bottom: 16px;
    color: #38B6FF;
}

/* ── Dynamic ingredient/direction rows ── */
.dynamic-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.dynamic-row input,
.dynamic-row textarea {
    flex: 1;
    margin-bottom: 0;
}

.dynamic-row .remove-btn {
    flex-shrink: 0;
    width: 36px;
    height: 48px;
    background-color: #c0392b;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
}

.dynamic-row textarea ~ .remove-btn {
    height: 80px;
}

.add-row-btn {
    background-color: #2d6a4f;
    color: #fff;
    margin-top: 4px;
}

.add-row-btn:hover {
    background-color: #3a8a64;
}

/* ── Section headers ── */
.section-header {
    font-size: 1rem;
    font-weight: bold;
    color: #ccc;
    margin: 16px 0 8px;
    border-bottom: 1px solid #444;
    padding-bottom: 4px;
}

/* ── Recipe view ── */
.recipe-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #38B6FF;
    margin-bottom: 6px;
}

.recipe-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 14px;
}

.recipe-meta span {
    background-color: #333;
    padding: 3px 8px;
    border-radius: 4px;
}

.ingredient-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.ingredient-list li {
    padding: 3px 0;
}

.direction-list {
    list-style: decimal;
    padding-left: 20px;
    margin: 0;
}

.direction-list li {
    padding: 5px 0;
    line-height: 1.5;
}

/* ── Footer ── */
.footer-spacer {
    height: 60px;
}

.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #38B6FF;
    padding: 8px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.footer-button {
    height: 40px;
    font-size: 0.9rem;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* ── Errors / notices ── */
.error {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.success {
    color: #2ecc71;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    color: #666;
    padding: 40px 0;
}

/* ── Responsive ── */
@media (max-width: 500px) {
    .recipe-meta {
        gap: 8px;
    }
}
