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

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden; /* Prevent scrolling */
    height: 100vh;
    width: 100vw;
}

.altar-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.page-footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 40px;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.footer-title {
    font-family: 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: #000;
    letter-spacing: 3px;
    text-align: center;
    margin: 0;
}

.footer-star-left,
.footer-star-right {
    position: absolute;
    color: #000;
    font-size: 20px;
    font-weight: bold;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
}

.footer-star-left {
    left: 12px;
}

.footer-star-right {
    right: 12px;
}

.altar-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('altar-TT.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    cursor: crosshair; /* Show that it's clickable */
    pointer-events: auto; /* Ensure it's clickable */
}

.offerings-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: auto; /* Allow clicks on offerings */
}

.offering {
    position: absolute;
    font-size: 2rem;
    cursor: pointer;
    pointer-events: all;
    transition: transform 0.2s ease;
    z-index: 3;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 5px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.offering-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    pointer-events: none;
}

.offering:hover {
    transform: scale(1.2);
    z-index: 1001 !important;
}

.intro-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 25px;
    border-radius: 5px;
    z-index: 10;
    max-width: 320px;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    position: relative;
}

.intro-content {
    line-height: 1.6;
}

.intro-content p {
    margin-bottom: 15px;
}

.intro-content strong {
    font-weight: bold;
}

.intro-content .signature {
    font-style: italic;
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #000;
}

.minimize-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: 2px solid #000;
    color: #000;
    font-size: 1.5rem;
    width: 28px;
    height: 28px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-weight: bold;
    line-height: 1;
}

.panel-minimized .minimize-btn {
    top: 11px;
    right: 11px;
}

.minimize-btn:hover {
    background: #000;
    color: #fff;
}

.panel-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Times New Roman', serif;
    font-size: 0.9rem;
    font-weight: 900;
    color: #000;
    letter-spacing: 3px;
    display: none;
}

.panel-minimized .panel-label {
    display: block;
}

.panel-minimized {
    height: 50px !important;
    max-height: 50px !important;
    min-height: 50px !important;
    overflow: hidden;
    padding: 8px;
}

.panel-minimized .minimize-btn::before {
    content: '+';
    font-size: 1.5rem;
}

.panel-minimized .minimize-btn {
    font-size: 0;
}

.emoji-panel.panel-minimized {
    top: 48px !important;
}

.panel-minimized .intro-content,
.panel-minimized .panel-corner-bottom-left,
.panel-minimized .panel-corner-bottom-right,
.panel-minimized .panel-corner-top-left {
    display: none;
}

.panel-minimized h3,
.panel-minimized .offering-options,
.panel-minimized .instruction {
    display: none;
}

.offering-hover-popup {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    z-index: 1002;
    visibility: hidden;
}

.offering:hover .offering-hover-popup {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.hover-popup-content {
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    max-width: 250px;
    white-space: normal;
    border: 2px solid #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hover-popup-content p {
    margin: 4px 0;
    line-height: 1.4;
}

.hover-popup-content strong {
    color: #fff;
}

.emoji-panel {
    position: fixed;
    top: 48px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 25px;
    border-radius: 5px;
    z-index: 10;
    max-width: 320px;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    position: relative;
}

.panel-corner-top-left,
.panel-corner-top-right,
.panel-corner-bottom-left,
.panel-corner-bottom-right {
    position: absolute;
    color: #000;
    font-size: 20px;
    font-weight: bold;
}

.panel-corner-top-left {
    top: 5px;
    left: 8px;
}

.panel-corner-top-right {
    top: 5px;
    right: 8px;
}

.panel-corner-bottom-left {
    bottom: 5px;
    left: 8px;
}

.panel-corner-bottom-right {
    bottom: 5px;
    right: 8px;
}

.emoji-panel h3 {
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Times New Roman', serif;
    font-size: 1.5rem;
    color: #000;
    letter-spacing: 2px;
    font-weight: bold;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.offering-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
}

.offering-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.offering-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.offering-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
    transform: scale(1.1);
}

.offering-btn.selected {
    background: rgba(255, 255, 255, 0.4);
    border-color: #015127;
    transform: scale(1.1);
}

.instruction {
    font-size: 0.85rem;
    text-align: center;
    opacity: 0.9;
    color: #000;
    font-style: italic;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #000;
}

/* 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.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    margin: 10% auto;
    padding: 35px 30px 30px;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-corner-top-left,
.modal-corner-bottom-left,
.modal-corner-bottom-right {
    position: absolute;
    color: #000;
    font-size: 20px;
    font-weight: bold;
    pointer-events: none;
}

.modal-corner-top-left {
    top: 5px;
    left: 8px;
}

.modal-corner-bottom-left {
    bottom: 5px;
    left: 8px;
}

.modal-corner-bottom-right {
    bottom: 5px;
    right: 8px;
}

.modal-content h3 {
    margin-bottom: 20px;
    text-align: center;
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #000;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #000;
    border-radius: 3px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-actions button {
    padding: 10px 20px;
    border: 2px solid #000;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    background: transparent;
    color: #000;
    font-weight: bold;
}

.form-actions button:hover {
    background: #000;
    color: #fff;
}

/* Popup Styles */
.offering-popup {
    display: none;
    position: fixed;
    z-index: 1001;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 35px 25px 25px;
    border: 3px solid #000;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    animation: popupSlideIn 0.3s ease;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}


.popup-corner-top-left,
.popup-corner-top-right,
.popup-corner-bottom-left,
.popup-corner-bottom-right {
    position: absolute;
    color: #000;
    font-size: 20px;
    font-weight: bold;
    pointer-events: none;
}

.popup-corner-top-left {
    top: 5px;
    left: 8px;
}

.popup-corner-top-right {
    top: 5px;
    right: 8px;
}

.popup-corner-bottom-left {
    bottom: 5px;
    left: 8px;
}

.popup-corner-bottom-right {
    bottom: 5px;
    right: 8px;
}

.popup-offering-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.popup-offering-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #000;
}

.close-popup {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: 2px solid #000;
    font-size: 24px;
    cursor: pointer;
    color: #000;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-weight: bold;
    line-height: 1;
    z-index: 100;
}

.close-popup:hover {
    background-color: #000;
    color: #fff;
    border: 2px solid #000;
}

.popup-body {
    text-align: center;
}

.popup-body p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #000;
}

.popup-body strong {
    color: #000;
}

.timestamp {
    font-size: 0.9rem;
    color: #000;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-footer {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 8px 20px;
        transform: none;
    }
    
    .footer-title {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .intro-panel {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .intro-content {
        font-size: 0.9rem;
    }
    
    .emoji-panel {
        top: auto;
        bottom: 70px;
        left: 10px;
        right: 10px;
        max-width: none;
        padding: 15px;
    }

    .panel-minimized {
        width: auto;
        max-width: 60px;
        padding: 8px;
        top: 10px;
        left: 10px;
        right: auto;
        margin-bottom: 0;
    }
    
    .panel-minimized .panel-label {
        display: none !important;
    }
    
    .offering-options {
        justify-content: center;
    }
    
    .offering-btn {
        width: 50px;
        height: 50px;
    }
    
    .offering {
        width: 50px;
        height: 50px;
    }
    
    .instruction {
        font-size: 0.8rem;
    }
    
    .hover-popup-content {
        max-width: 200px;
        font-size: 0.75rem;
    }
    
    .modal-content {
        margin: 0 auto;
        padding: 20px;
        width: calc(95% - 40px);
        max-width: calc(500px - 40px);
    }
    
    .modal-content h3 {
        font-size: 1.2rem;
    }
    
    .popup-content {
        padding: 20px;
        max-width: calc(90% - 40px);
        width: calc(90% - 40px);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) !important;
    }
    
    .offering-popup {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}
