/* Body with cosmic gradient and twinkling stars */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    color: #fff;
    position: relative;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Twinkling stars effect */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="1" fill="white" /></svg>') repeat;
    opacity: 0.1;
    animation: twinkle 5s infinite;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* Hide sections by default */
.section {
    display: none;
}

/* Show active section */
.section.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Card styling */
.card {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 20px rgba(240, 230, 140, 0.3);
    animation: slideIn 0.5s ease-out forwards;
}

/* Animation for card entry */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Headings */
h1, h2, h3 {
    font-family: 'Cinzel', serif;
    color: #f0e68c;
}

/* Options container */
#options-container {
    margin-top: 20px;
}

/* Glowing buttons */
button {
    padding: 10px 20px;
    background-color: #f0e68c;
    color: #1a1a2e;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 0 10px #f0e68c;
    transition: box-shadow 0.3s;
    margin: 5px;
    width: 100%;
    max-width: 200px;
}

button:hover {
    box-shadow: 0 0 20px #f0e68c;
}

/* Itinerary list with moon bullets */
ol {
    list-style: none;
    padding-left: 0;
    text-align: left;
    position: relative;
}

ol li {
    font-size: 1.1em;
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
    padding-right: 30px; /* Space for delete button */
    transition: all 0.3s ease;
}

/* Drag handle */
.drag-handle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #f0e68c;
    font-size: 1.2em;
    cursor: grab;
    user-select: none;
}

/* Delete button */
.delete-button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #f0e68c;
    font-size: 1.2em;
    cursor: pointer;
    user-select: none;
    opacity: 0;
    transition: opacity 0.2s;
}

ol li:hover .delete-button {
    opacity: 1;
}

/* Show handle and delete button on hover for desktop, always visible on mobile */
@media (min-width: 601px) {
    .drag-handle {
        opacity: 0;
        transition: opacity 0.2s;
    }
    ol li:hover .drag-handle {
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .drag-handle, .delete-button {
        opacity: 1;
    }
}

/* Dragging state */
.dragging {
    opacity: 0.5;
    background: rgba(240, 230, 140, 0.2);
    position: absolute;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
}

/* Placeholder for drop zone */
.drag-placeholder {
    background: rgba(240, 230, 140, 0.1);
    height: 60px;
    margin-bottom: 15px;
    border: 1px dashed #f0e68c;
    transition: all 0.3s ease;
}

/* Details/Summary for expandable hours */
details {
    margin-top: 10px;
    text-align: left;
}

summary {
    cursor: pointer;
    color: #f0e68c;
    font-family: 'Open Sans', sans-serif;
    padding: 5px;
    outline: none;
}

summary::-webkit-details-marker {
    color: #f0e68c;
}

details[open] summary {
    font-weight: bold;
}

details p {
    margin: 5px 0 0 15px;
    color: #fff;
}

.maps-meta {
    margin-top: 8px;
    font-size: 0.9em;
    color: #f4f4d0;
}

.maps-link {
    display: inline-block;
    margin-top: 8px;
    color: #f0e68c;
}

.maps-link:hover {
    color: #fff6b0;
}

.admin-link-wrap {
    position: fixed;
    bottom: 16px;
    right: 20px;
    z-index: 20;
}

.admin-link-wrap a {
    color: #f0e68c;
}

.admin-card {
    max-width: 760px;
    text-align: left;
}

.admin-row {
    margin-top: 12px;
}

.admin-row label {
    display: block;
    margin-bottom: 6px;
    color: #f0e68c;
}

.admin-row select,
.admin-row input,
.admin-row textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: 'Open Sans', sans-serif;
}

.admin-status {
    margin-top: 14px;
    color: #d5ffd7;
}

.admin-status.admin-status-error {
    color: #ffd6d6;
}

/* Hover summary card */
.hover-card {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    max-width: 250px;
    box-shadow: 0 0 15px rgba(240, 230, 140, 0.3);
    z-index: 10;
}

.hover-card.hidden {
    display: none;
}

.hover-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hover-card li {
    margin-bottom: 10px;
    font-size: 0.9em;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .card {
        padding: 15px;
        max-width: 90%;
    }
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.4em;
    }
    button {
        width: 100%;
        max-width: none;
    }
    .hover-card {
        top: 10px;
        right: 10px;
        max-width: 200px;
    }
}
