:root {
    --primary-color: #3bb3e5;
    --primary-hover: #2196f3;
    --accent-color: #e6007e;
    --bg-color: #111827;
    --text-color: #f9fafb;
    --text-muted: #9ca3af;
    --card-bg: rgba(31, 41, 55, 0.7);
    --input-bg: rgba(55, 65, 81, 0.5);
    --border-color: rgba(75, 85, 99, 0.5);
    --success-color: #10b981;
    --error-color: #ef4444;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 179, 229, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(230, 0, 126, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0;
    padding: 2rem;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: var(--glass-border);
}

/* ... existing styles ... */

.landing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 1rem;
}

.login-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-box h1 {
    margin-bottom: 1.5rem;
}

/* Responsive adjustment for grid */
@media (max-width: 900px) {
    .landing-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }



    .site-description {
        padding-right: 0;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 2rem;
        margin-bottom: 2rem;
        border-right: none;
    }
}

/* Cookie Banner Styles */
.cookie-banner {
    display: none;
    /* Hidden by default, JS enables it */
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.cookie-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    text-align: left;
    font-size: 1.2rem;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-cookie {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-accept,
.btn-reject {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    flex: 1;
    /* Make them equal width */
}

.btn-accept:hover,
.btn-reject:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-settings {
    background: transparent;
    text-decoration: underline;
    color: var(--text-muted);
}

/* Cookie Modal */
.cookie-modal {
    display: none;
    /* Flex when active */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.cookie-modal-content {
    background: var(--bg-color);
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.cookie-option {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cookie-option:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4b5563;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* Revoke Button */
.cookie-revoke {
    display: none;
    /* Flex when banner hidden */
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.cookie-revoke:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

@media (max-width: 600px) {
    .cookie-banner {
        bottom: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        border-left: none;
        border-right: none;
    }

    .cookie-buttons {
        flex-direction: column-reverse;
    }

    .btn-cookie {
        width: 100%;
        text-align: center;
    }
}

/* Header & Logo */
header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    max-height: 80px;
    width: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 5px rgba(59, 179, 229, 0.5));
    display: block;
    margin-left: auto;
    margin-right: auto;
    background: transparent !important;
}

h1,
h2,
h3 {
    color: white;
    font-weight: 700;
    margin-top: 0;
    letter-spacing: -0.025em;
    text-align: center;
}

h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    width: 100%;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--input-bg);
    color: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 179, 229, 0.2);
}

/* Buttons */
button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    filter: brightness(1.1);
}

.btn-rss {
    background: linear-gradient(135deg, var(--bg-color), var(--card-bg));
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    margin-top: 1rem;
}

.btn-rss:hover {
    background: rgba(59, 179, 229, 0.1);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

a:hover {
    color: var(--accent-color);
}

/* Tables (Admin) */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    border: var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

th {
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    width: auto;
    margin-left: 0.5rem;
}

.btn-activate {
    background-color: var(--success-color);
}

.btn-deactivate {
    background-color: #f59e0b;
}

.btn-delete {
    background-color: var(--error-color);
}

/* Custom File Input styles removed */

/* Legal Modal (reuses structure of cookie modal but adds specific overrides if needed) */
.legal-modal {
    display: none;
    /* Flex when active */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    /* Above cookie banner/modal */
    align-items: center;
    justify-content: center;
}

.legal-modal-content {
    background: var(--bg-color);
    width: 90%;
    max-width: 800px;
    /* Wider for legal text */
    max-height: 90vh;
    /* Taller */
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.legal-modal-content .modal-header {
    flex-shrink: 0;
}

.legal-modal-content .modal-body {
    padding: 2rem;
    overflow-y: auto;
    color: var(--text-color);
    line-height: 1.6;
}

.legal-modal-content h2 {
    text-align: left;
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-top: 1.5rem;
}

.legal-modal-content h3 {
    text-align: left;
    font-size: 1.1rem;
    color: white;
    margin-top: 1rem;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.post {
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.post:last-child {
    border-bottom: none;
}

.links {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 2rem;
}

/* Site Footer */
.site-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-muted);
}

.site-footer a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.site-description {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    color: var(--text-muted);
}

.site-description h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-description .intro {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s;
}

.feature:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.feature strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.feature span {
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
}

.cta {
    text-align: center;
    font-size: 1.1rem;
    color: white;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(59, 179, 229, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(59, 179, 229, 0.2);
}

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    .container {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Captcha Styling - Spam Protection Layout */
.captcha-group label.spam-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.captcha-container {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    height: 52px;
    /* Fixed height for alignment */
}

.captcha-image-wrapper {
    flex: 0 0 auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    background: var(--bg-color);
}

.captcha-image-wrapper img {
    height: 100%;
    width: auto;
    display: block;
    object-fit: cover;
}

.btn-reload {
    flex: 0 0 52px;
    /* Square */
    width: 52px;
    height: 52px;
    /* Explicit height */
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.2s;
    box-shadow: none;
}

.btn-reload:hover {
    background: rgba(59, 179, 229, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: none;
}

.captcha-input {
    flex: 1;
    height: 52px;
    /* Explicit height */
    border-radius: 8px;
    background: rgba(17, 24, 39, 0.6) !important;
    /* Darker background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-color) !important;
    /* Cyan-ish text color like image */
    font-family: monospace;
    font-size: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0 1.5rem !important;
    margin: 0;
}

.captcha-input::placeholder {
    color: rgba(156, 163, 175, 0.4);
    letter-spacing: 0.15em;
    font-family: monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.captcha-input:focus {
    background: rgba(17, 24, 39, 0.8) !important;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

@media (max-width: 500px) {
    .captcha-container {
        flex-wrap: wrap;
        height: auto;
        gap: 0.5rem;
    }

    .captcha-image-wrapper {
        flex: 1 1 100%;
        justify-content: center;
        height: 50px;
    }

    .btn-reload {
        flex: 1;
        height: 50px;
        width: auto;
    }

    .captcha-input {
        flex: 3;
        height: 50px;
    }
}

/* Footer Layout Update */
.site-footer {
    display: flex;
    flex-direction: column;
    /* Stack them */
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    text-align: center;
    gap: 1rem;
    /* Space between links and coffee */
}

.footer-links {
    width: 100%;
}

.footer-coffee {
    margin-left: 0;
    /* Reset margin */
}

@media (max-width: 768px) {
    /* No specific override needed as it's already centered column */
}

/* Coffee Modal Styles */
.coffee-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10002;
    /* Above everything */
    align-items: center;
    justify-content: center;
}

.coffee-modal-content {
    background: var(--bg-color);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 179, 229, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(230, 0, 126, 0.1) 0px, transparent 50%);
}

.coffee-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.btn-donate {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.2s, filter 0.2s;
    color: white !important;
    font-size: 1.1rem;
}

.btn-donate:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-paypal {
    background: #3bb3e5;
    /* Sky Blue */
}

.btn-bmac {
    background: #e6007e;
    /* Hot Pink */
}

/* Cancel Button Styles */
.btn-cancel {
    display: block;
    width: 100%;
    max-width: 400px;
    /* Match donate buttons */
    margin: 1.5rem auto 0;
    padding: 0.75rem;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-cancel:hover {
    border-color: var(--text-color);
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}