/* Global Resets & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.link {
    color: #5cbe4a;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Header Styles */
.header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #5cbe4a;
    margin-bottom: 30px;
}

.header h1 {
    color: #5cbe4a;
    font-size: 2.2rem;
}

.header p {
    font-size: 1.1rem;
    margin-top: 10px;
    color: #cccccc;
}

/* Package Card Styles */
.package-card {
    background-color: #2d2d2d;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 15px rgba(92, 190, 74, 0.3);
    margin-bottom: 30px;
}

.package-title {
    color: #5cbe4a;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.package-subtitle {
    color: #5cbe4a;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.items-list {
    text-align: left;
    max-width: 350px;
    margin: 0 auto 25px;
    line-height: 1.8;
}

.items-list li {
    margin-left: 20px;
}

.perk-highlight {
    color: #5cbe4a;
    font-weight: bold;
}

.buy-button {
    background-color: #5cbe4a;
    color: #1a1a1a;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.buy-button:hover {
    background-color: #4aa03b;
}

/* Instructions Section Styles */
.instructions-section {
    background-color: #2d2d2d;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.section-title {
    color: #5cbe4a;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.steps-list {
    max-width: 450px;
    margin: 0 auto;
    line-height: 1.8;
}

.steps-list li {
    margin-left: 25px;
    margin-bottom: 10px;
}

.note-box {
    background-color: #383838;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    margin-top: 15px;
    color: #5cbe4a;
}

/* Highlight GCash Number */
.note-box b:last-child {
    color: #fff;
    background-color: #009444;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 1rem;
    display: inline-block;
    margin-top: 8px;
}

/* Popup Base Styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 0;
    overflow-y: auto;
}

/* Purchase Form Popup */
.popup-content {
    background-color: #2d2d2d;
    width: 90%;
    max-width: 450px;
    border-radius: 10px;
    padding: 30px;
    position: relative;
    border: 2px solid #5cbe4a;
    margin-top: 20px;
}

/* Receipt Preview Popup (For Screenshotting) */
.receipt-preview-content {
    background-color: #2d2d2d;
    width: 95%;
    max-width: 550px;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    border: 2px solid #5cbe4a;
    margin: 20px auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 101;
}

.close-btn:hover {
    color: #5cbe4a;
}

.popup-title {
    color: #5cbe4a;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    padding-top: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #cccccc;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #5cbe4a;
    background-color: #1a1a1a;
    color: #fff;
    font-size: 1rem;
}

.form-group input:invalid, .form-group select:invalid {
    border-color: #ff4444;
}

.form-group input:valid, .form-group select:valid {
    border-color: #5cbe4a;
}

#otherMethodField {
    display: none;
}

.submit-btn {
    width: 100%;
    background-color: #5cbe4a;
    color: #1a1a1a;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #4aa03b;
}

/* Receipt Preview Container (For Screenshot Clarity) */
.receipt-preview-container {
    margin: 0 auto 25px;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(92, 190, 74, 0.5);
}

/* Paper-Style Receipt (Optimized for Screenshots) */
.receipt-paper {
    width: 100%;
    max-width: 500px;
    background-color: #f8f5e6;
    color: #222;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-family: 'Courier New', Courier, monospace;
    margin: 0 auto;
}

.receipt-header {
    text-align: center;
    margin-bottom: 15px;
}

.receipt-logo {
    margin-bottom: 10px;
    border-bottom: 1px dashed #888;
    padding-bottom: 10px;
    width: 100%;
    height: auto;
}

.receipt-header h2 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.receipt-subheader {
    font-size: 0.9rem;
    color: #666;
}

.receipt-divider {
    height: 1px;
    background-color: #ddd;
    margin: 10px 0;
}

.receipt-divider.thick {
    height: 2px;
    background-color: #888;
    margin: 15px 0;
}

.label {
    font-weight: bold;
    color: #000;
    display: inline-block;
    width: 160px;
}

.receipt-id-section p, 
.receipt-customer-section p, 
.receipt-purchase-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 5px;
}

.receipt-customer-section h3, 
.receipt-purchase-section h3, 
.receipt-items-section h3, 
.receipt-claim-section h3 {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: #444;
    border-bottom: 1px dashed #888;
    padding-bottom: 5px;
}

.receipt-items-section ul {
    margin-left: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.receipt-items-section li {
    margin-bottom: 3px;
}

.receipt-claim-section {
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.8;
}

.messenger-link a {
    color: #1877f2;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.05rem;
}

.messenger-link a:hover {
    text-decoration: underline;
}

.receipt-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 0.85rem;
    color: #666;
    border-top: 1px dashed #888;
    padding-top: 10px;
}

.receipt-footer p {
    margin-bottom: 3px;
}

/* Screenshot Guidance Section */
.screenshot-guide {
    background-color: #383838;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.screenshot-guide h4 {
    color: #5cbe4a;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.screenshot-guide ul {
    list-style: none;
    max-width: 400px;
    margin: 0 auto 20px;
    line-height: 1.8;
    color: #fff;
}

.screenshot-guide li {
    margin-bottom: 8px;
    font-size: 1rem;
}

.download-btn {
    background-color: #5cbe4a;
    color: #1a1a1a;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background-color: #4aa03b;
}

/* Loading Overlay Styles */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 200;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: #fff;
}

.loading-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #5cbe4a;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer Styles */
.footer {
    text-align: center;
    padding: 20px 0;
    border-top: 2px solid #5cbe4a;
    color: #cccccc;
}

.footer p {
    margin-bottom: 5px;
}

/* Responsive Mobile Adjustments */
@media (max-width: 550px) {
    .receipt-paper {
        padding: 20px;
    }

    .label {
        width: 120px;
        font-size: 0.9rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .price {
        font-size: 2rem;
    }

    .popup-content, .receipt-preview-content {
        padding: 20px;
        margin-top: 10px;
    }

    .receipt-header h2 {
        font-size: 1.2rem;
    }

    .screenshot-guide li {
        font-size: 0.9rem;
    }

    .note-box b:last-child {
        font-size: 0.9rem;
        padding: 2px 6px;
    }
}

/* Fix for Screenshot Rendering */
.receipt-preview-container, .receipt-paper {
    visibility: visible !important;
    display: block !important;
  }
