/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #262626;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: #ffd700;
    max-width: 300px;
    padding: 2rem;
}

.loading-logo {
    width: 180px;
    height: auto;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.progress-container {
    width: 100%;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #ffd700;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.loading-text {
    margin-top: 1rem;
    font-size: 1rem;
    color: #aaa;
    font-weight: 300;
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Memories Page Styles */

.hero {
    text-align: center;
    padding: 2rem 0;
    margin-top: 100px;
    background: linear-gradient(135deg, #333 0%, #262626 100%);
    color: #ffd700;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.input-section {
    padding: 1rem;
    text-align: center;
    background: #333;
}

.input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.input-container h2 {
    margin: 0;
    color: #ffd700;
    white-space: nowrap;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#place-input {
    padding: 0.5rem;
    border: 1px solid #555;
    border-radius: 4px;
    background: #262626;
    color: #ffd700;
    min-width: 200px;
}

#place-input option {
    background: #262626;
    color: #ffd700;
}

#add-place-btn {
    padding: 0.5rem 1rem;
    background: #861818;
    color: #ffd700;
    border: 1px solid #861818;
    border-radius: 4px;
    cursor: pointer;
}

#add-place-btn:hover {
    background: #6a1313;
}

.map-section {
    padding: 1rem;
    text-align: center;
}

.map-section h2 {
    color: #ffd700;
}

#map {
    height: 500px;
    width: 100%;
    border: 1px solid #555;
    border-radius: 8px;
}

.places-section {
    padding: 2rem;
}

.places-section h2 {
    color: #ffd700;
}

.place-card {
    background: #333;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.place-card h3 {
    margin-top: 0;
    color: #ffd700;
}

.place-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.button-group {
    display: flex;
    align-items: center;
}

.toggle-btn {
    background: none;
    border: none;
    color: #ffd700;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.toggle-btn:hover {
    color: #fff;
}

.remove-btn {
    background: none;
    border: none;
    color: #861818;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 0.5rem;
}

.remove-btn:hover {
    color: #ff4444;
}

.poi-list {
    list-style: none;
    padding: 0;
}

.poi-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.poi-item input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #861818;
}

.poi-item label {
    cursor: pointer;
    color: #ffd700;
}

.memories-section {
    padding: 2rem;
}

.memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.memory-card {
    background: #333;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: #861818;
    color: #ffd700;
    border: 1px solid #861818;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.save-btn {
    background: #861818;
    color: #ffd700;
    border: 1px solid #861818;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 1rem;
    width: 100%;
}

.save-btn:hover {
    background: #6a1313;
}

.places-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    color: #ffd700;
}

.placeholder-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

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

.placeholder-content p {
    opacity: 0.8;
    font-size: 1rem;
}

/* Custom pulsing marker */
.custom-marker {
    background: none;
    border: none;
}

.pulsing-marker {
    width: 6px;
    height: 6px;
    background-color: #00ff00;
    /* Brighter solid green */
    border-radius: 50%;
    animation: pulse-marker 3s infinite;
}

@keyframes pulse-marker {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Check-in Button Styles */
.checkin-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.checkin-button {
    background: linear-gradient(135deg, #861818, #a01d1d);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.checkin-button:hover {
    background: linear-gradient(135deg, #a01d1d, #c02020);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(134, 24, 24, 0.3);
}

.checkin-button:active {
    transform: translateY(0);
}

.checkin-button i {
    font-size: 18px;
}

.checkin-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero {
        padding: 1.5rem 1rem;
        margin-top: 80px;
        /* Adjust for mobile navbar */
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .input-section {
        padding: 1rem 0.5rem;
    }

    .input-container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .input-container h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .input-group {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    #place-input {
        min-width: auto;
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }

    #add-place-btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        width: 100%;
    }

    .map-section {
        padding: 1rem 0.5rem;
    }

    #map {
        height: 300px;
        /* Shorter map on mobile */
    }

    .places-section {
        padding: 1rem 0.5rem;
    }

    .places-section h2 {
        font-size: 1.5rem;
    }

    .place-card {
        padding: 0.75rem;
    }

    .place-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .button-group {
        align-self: flex-end;
    }

    .memories-section {
        padding: 1rem 0.5rem;
    }

    .memories-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
        gap: 0.75rem;
    }

    .memory-card {
        padding: 0.75rem;
    }

    .checkin-button {
        padding: 14px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .checkin-description {
        font-size: 12px;
        text-align: center;
    }

    .places-placeholder {
        padding: 2rem 1rem;
    }

    .placeholder-content i {
        font-size: 2.5rem;
    }

    .placeholder-content h3 {
        font-size: 1.2rem;
    }

    .placeholder-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .input-container h2 {
        font-size: 1.1rem;
    }

    #map {
        height: 250px;
        /* Even shorter on very small screens */
    }

    .places-section h2 {
        font-size: 1.3rem;
    }

    .place-card h3 {
        font-size: 1.1rem;
    }

    .checkin-button {
        padding: 12px 16px;
        font-size: 13px;
    }

    .checkin-description {
        font-size: 11px;
    }
}

/* Modal Mobile Responsiveness */
@media (max-width: 768px) {
    .modal-content {
        width: 90% !important;
        margin: 20% auto !important;
        padding: 15px !important;
    }

    .modal-content h2 {
        font-size: 1.2rem;
    }

    #modal-close {
        font-size: 24px;
    }
}

/* Ad layout around the map */
.map-ad-layout {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    /* Left ad, map, right ad */
    gap: 20px;
    align-items: start;
    margin: 20px 0;
}

.ad-left,
.ad-right {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.ad-bottom {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .map-ad-layout {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
        gap: 10px;
    }

    .ad-left,
    .ad-right {
        display: none;
        /* Hide side ads on mobile */
    }
}