* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: #fef9f0;
    color: #2c3e2f;
    min-height: 100vh;
    transition: all 0.3s ease;
}

body.theme-sunrise {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 50%, #ffedd5 100%);
    color: #4a3c2f;
}

body.theme-noon {
    background: linear-gradient(145deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
    color: #0f4c5c;
}

body.theme-evening {
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 25%, #fcd34d 50%, #fbbf24 75%, #f59e0b 100%);
    color: #4c3419;
}

body.theme-stargazer {
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 50%, #020617 100%);
    color: #e2e8f0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

/* Top bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2d4c0;
    position: sticky;
    top: 0;
    z-index: 900;
}

body.theme-stargazer .top-bar {
    background: rgba(15, 23, 42, 0.85);
    border-bottom-color: #334155;
}

.brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f4f2b;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

body.theme-stargazer .brand {
    color: #e2e8f0;
}

.theme-dropdown {
    padding: 0.35rem 0.8rem;
    border: 1px solid #d4c2a5;
    border-radius: 40px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    color: #4a6741;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    width: auto;
    max-width: 250px;
}

.theme-dropdown:hover {
    border-color: #1f7b4d;
}

body.theme-stargazer .theme-dropdown {
    background: rgba(30, 41, 59, 0.9);
    border-color: #475569;
    color: #cbd5e1;
}

/* Page header */
.page-header {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
}

.page-header h1 {
    font-size: 2.2rem;
    color: #1f4f2b;
    margin-bottom: 0.4rem;
}

body.theme-stargazer .page-header h1 {
    color: #e2e8f0;
}

.page-header .subhead {
    color: #6b7c62;
    font-size: 1rem;
}

body.theme-stargazer .page-header .subhead {
    color: #94a3b8;
}

.wave {
    display: inline-block;
    animation: wave 2s infinite ease;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(12deg); }
}

/* Lower nav */
.lower-nav {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1rem 1.5rem 0;
    border-top: 1px solid #e2d4c0;
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.lower-nav a {
    color: #1f7b4d;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.3rem 0;
    transition: color 0.2s;
}

.lower-nav a:hover {
    color: #0e5f3a;
}

body.theme-stargazer .lower-nav {
    border-top-color: #334155;
}

body.theme-stargazer .lower-nav a {
    color: #818cf8;
}

/* Site footer */
.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 2.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #7c6e58;
    line-height: 1.6;
}

body.theme-stargazer .site-footer {
    color: #64748b;
}

/* Shared message styles */
.message {
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.message.success {
    background: #dff0e2;
    color: #1f4f2b;
    border-left: 4px solid #1f7b4d;
}

.message.info {
    background: #e7eef5;
    color: #2c5f8a;
    border-left: 4px solid #4a90c4;
}

/* Shared form styles */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #4a6741;
}

body.theme-stargazer label {
    color: #94a3b8;
}

input, select, textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #d4c2a5;
    border-radius: 12px;
    font-size: 0.95rem;
    background: #fffef8;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: #1f7b4d;
    outline: none;
}

textarea {
    resize: vertical;
}

button {
    background: #1f7b4d;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: background 0.2s, transform 0.1s;
}

button:hover {
    background: #0e5f3a;
    transform: translateY(-1px);
}

/* Shared modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    max-width: 600px;
    width: 90%;
    border-radius: 32px;
    padding: 1.8rem;
    position: relative;
    max-height: 85%;
    overflow-y: auto;
}

body.theme-stargazer .modal-content {
    background: #1e293b;
    color: #e2e8f0;
}

.modal-img {
    width: 100%;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.close {
    position: absolute;
    right: 1.2rem;
    top: 1rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #8b7a64;
    line-height: 1;
}

.close:hover {
    color: #2c3e2f;
}

body.theme-stargazer .close {
    color: #64748b;
}

body.theme-stargazer .close:hover {
    color: #e2e8f0;
}

.modal h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-detail {
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

body.theme-stargazer .modal-detail {
    border-bottom-color: #334155;
}

/* Shared card / utility */
.linked-badge {
    display: inline-block;
    background: #e6d5b8;
    color: #5e3a1c;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.5rem;
}

body.theme-stargazer .linked-badge {
    background: #334155;
    color: #cbd5e1;
}

/* Responsive */
@media (max-width: 700px) {
    .page-header h1 { font-size: 1.6rem; }
    .page-header { padding: 1.5rem 1rem 1.5rem; }
    .lower-nav { gap: 0.8rem; }
    .lower-nav a { font-size: 0.8rem; }
    .brand { font-size: 1rem; }
}
