/* --- Color Themes using CSS Variables --- */
:root {
    /* Default Theme: Neon Green */
    --bg-color: #0d0d2b;
    --main-color: #00ff00;
    --secondary-color: #ff00ff;
    --disabled-main: #005200;
    --disabled-secondary: #5c005c;
    --text-color: #00ff00;
    --bg-hover: rgba(0, 255, 0, 0.1);
    --checkbox-char: '■';
}

body.theme-amber {
    /* Amber Theme */
    --bg-color: #1a1000;
    --main-color: #ffb800;
    --secondary-color: #00d9ff;
    --disabled-main: #614500;
    --disabled-secondary: #005a69;
    --text-color: #ffb800;
    --bg-hover: rgba(255, 184, 0, 0.1);
    --checkbox-char: '◆';
}

body.theme-vaporwave {
    /* Vaporwave Theme */
    --bg-color: #0f0c2d;
    --main-color: #f721b6;
    --secondary-color: #00e5e5;
    --disabled-main: #610d48;
    --disabled-secondary: #005c5c;
    --text-color: #f721b6;
    --bg-hover: rgba(247, 33, 182, 0.1);
    --checkbox-char: '▲';
}

body.theme-monochrome {
    /* Monochrome Theme */
    --bg-color: #000000;
    --main-color: #c0c0c0;
    --secondary-color: #808080;
    --disabled-main: #3d3d3d;
    --disabled-secondary: #2b2b2b;
    --text-color: #c0c0c0;
    --bg-hover: rgba(192, 192, 192, 0.1);
    --checkbox-char: 'X';
}
/* --- End of Themes --- */


/* --- Main 80s Retro Styling --- */
body {
    background-color: var(--bg-color); 
    color: var(--text-color); 
    font-family: 'VT323', monospace;
    font-size: 20px;
    text-shadow: 0 0 5px var(--main-color), 0 0 10px var(--main-color); 
    margin: 0;
    padding: 2rem;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s; 
}

/* Header layout */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap; /* Allow wrapping on very small screens */
    gap: 1rem;
}
.header-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

h1 {
    margin: 0;
}
h2 {
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 3px;
}
/* --- End Header --- */

.container {
    max-width: 800px;
    margin: 0 auto;
    border: 2px solid var(--main-color); 
    padding: 2rem;
    box-shadow: 0 0 15px var(--main-color) inset; 
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.3),
        rgba(0, 0, 0, 0.3) 1px,
        transparent 1px,
        transparent 3px
    );
    z-index: 1000;
}


/* --- Message List --- */
.message-list {
    border: 1px solid var(--main-color); 
    padding: 1rem;
    min-height: 200px;
    margin-bottom: 2rem;
    overflow-y: auto;
    max-height: 40vh;
}
.modal-content p {
    margin-bottom: 1rem;
    line-height: 1.5;
}
/* NEW: Spacing for the PayPal form */
.modal-content form {
    margin: 2rem 0;
}

.message-item {
    padding: 0.5rem;
    border-bottom: 1px dashed var(--main-color); 
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.message-item:hover {
    background-color: var(--bg-hover); 
}

.message-item:last-child {
    border-bottom: none;
}

.message-item input[type="checkbox"] {
    margin-right: 1rem;
    appearance: none;
    background-color: transparent;
    border: 1px solid var(--main-color); 
    width: 16px;
    height: 16px;
    position: relative;
    cursor: pointer;
}

.message-item input[type="checkbox"]:checked::before {
    content: var(--checkbox-char); 
    color: var(--main-color); 
    position: absolute;
    top: -6px;
    left: 2px;
    font-size: 20px;
}

.list-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* --- Buttons --- */
.btn {
    background-color: transparent;
    border: 2px solid var(--main-color); 
    color: var(--main-color); 
    padding: 10px 20px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    text-shadow: 0 0 5px var(--main-color); 
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    width: 100%;
    text-align: left;
}
.btn-small {
    width: auto;
    padding: 5px 15px;
    font-size: 16px;
    white-space: nowrap;
}

.btn:hover:not(:disabled) {
    background-color: var(--main-color); 
    color: var(--bg-color); 
}

.btn:disabled {
    color: var(--disabled-main); 
    border-color: var(--disabled-main); 
    text-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    border-color: var(--secondary-color); 
    color: var(--secondary-color); 
    text-shadow: 0 0 5px var(--secondary-color); 
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--secondary-color); 
    color: var(--bg-color); 
}

.btn-secondary:disabled {
    border-color: var(--disabled-secondary); 
    color: var(--disabled-secondary); 
}


/* --- Modal (Pop-up) Styling --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
}

.modal-content {
    background-color: var(--bg-color); 
    border: 2px solid var(--main-color); 
    padding: 2rem;
    box-shadow: 0 0 20px var(--main-color); 
    width: 90%;
    max-width: 500px;
}

.hidden {
    display: none;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

input[type="text"], textarea {
    width: calc(100% - 20px);
    background-color: #000;
    border: 1px solid var(--main-color); 
    color: var(--main-color); 
    padding: 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    caret-color: var(--main-color); 
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 10px var(--main-color); 
}

.modal-actions {
    margin-top: 1rem; /* Reduced margin for better fit with form */
    display: flex;
    gap: 1rem;
}


/* --- Mobile Responsive Styles --- */
@media (max-width: 768px) {
    body {
        padding: 1rem;
        font-size: 18px;
    }

    .container {
        padding: 1rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .header-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    h1 {
        text-align: center;
    }

    .btn-small {
        width: 100%;
        text-align: center;
    }

    .list-actions {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }
}
