/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rubik+Glitch&display=swap');

/* Matrix Theme */
body {
    font-family: 'Roboto Mono', monospace;
    background-color: #0d0d0d;
    color: #00ff41;
    min-height: 100vh;
    position: relative;
}

#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.simple-blue-title {
    display: none;
}

.matrix-title {
    color: #00ff41;
    font-size: 2.5rem;
    text-align: center;
}

.matrix-card {
    background-color: #0c150c;
    border: 2px solid #004d00;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.matrix-input, .matrix-button {
    background-color: #0a110a;
    color: #00ff41;
    border: 1px solid #004d00;
}

.matrix-input::placeholder {
    color: #008000;
}

.matrix-button:hover {
    background-color: #004d00;
    box-shadow: 0 0 5px #00ff41;
}
.agenda-list li {
    border: 1px solid #004d00;
}

.subtle-text {
    color: #008000;
}

/* --- Dark Blue Theme --- */
.blue-theme {
    font-family: 'Roboto Mono', monospace;
    background-color: #0a192f;
    color: #ccd6f6;
}

.blue-theme .matrix-card {
    background-color: #172a45;
    border: 1px solid #233554;
    box-shadow: none;
}

.blue-theme .matrix-title {
    display: none;
}

.blue-theme .simple-blue-title {
    display: block;
    color: #58a6ff;
    font-family: 'Roboto Mono', monospace;
    font-size: 2.5rem;
}

.blue-theme h2 {
    color: #ccd6f6 !important;
}

.blue-theme .matrix-input,
.blue-theme .matrix-button {
    background-color: #0a192f;
    color: #ccd6f6;
    border: 1px solid #58a6ff;
}

.blue-theme .matrix-input::placeholder {
    color: #8892b0 !important;
}

.blue-theme .matrix-button:hover {
    background-color: rgba(88, 166, 255, 0.1);
    box-shadow: none;
}

.blue-theme .subtle-text {
    color: #8892b0;
}

.blue-theme .agenda-list li {
    background-color: transparent !important;
    border: 1px solid #233554;
}

.blue-theme .agenda-list li:hover {
    background-color: #233554 !important;
}

.blue-theme .starred-item {
    box-shadow: 0 0 0 3px #58a6ff;
    background-color: rgba(88, 166, 255, 0.1);
}

.blue-theme .view-archive-btn {
    color: #58a6ff !important;
}

/* --- CHANGE: Added .drag-handle-card to this rule --- */
.blue-theme .star-item-btn svg,
.blue-theme .edit-btn svg,
.blue-theme .archive-btn svg,
.blue-theme .delete-btn svg,
.blue-theme .delete-person-btn svg,
.blue-theme .drag-handle,
.blue-theme .drag-handle-card,
.blue-theme .close-modal-btn {
    color: #ccd6f6 !important;
}

.blue-theme .star-item-btn svg:hover,
.blue-theme .edit-btn svg:hover,
.blue-theme .archive-btn svg:hover,
.blue-theme .delete-person-btn svg:hover,
.blue-theme .close-modal-btn:hover {
    color: #58a6ff !important;
}
/* Fix Modal Fullscreen close button */
.blue-theme .fullscreen-card .close-modal-btn {
    color: #ccd6f6 !important;
}

.blue-theme .delete-btn:hover svg {
    color: #ff5252 !important;
}

.blue-theme .modal-content {
    background-color: #172a45;
    color: #ccd6f6;
    border: 1px solid #58a6ff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.blue-theme .modal-content li {
    background-color: #0a192f !important;
    color: #ccd6f6 !important;
}

.blue-theme #theme-toggle {
    background-color: #0a192f !important;
    color: #ccd6f6 !important;
    border: 1px solid #58a6ff;
}

.blue-theme a, .blue-theme a:visited {
    color: #58a6ff !important;
}

.blue-theme a:hover, .blue-theme a:active {
    text-decoration: underline;
}
/* --- End of Dark Blue Theme --- */


/* General UI Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #0c150c;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.7);
    max-width: 600px;
    width: 90%;
    color: #00ff41;
    position: relative;
    border: 2px solid #004d00;
}

.fullscreen-card {
    position: fixed;
    
    /* A more robust centering method */
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;

    /* Sizing, appearance, and layout */
    width: clamp(300px, 90vw, 72rem); 
    height: 90vh;
    z-index: 50;
    overflow-y: auto;
    padding: 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    /* Theming for Matrix (default) */
    background-color: #0c150c;
    border-radius: 1.5rem;
    border: 2px solid #004d00;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.7);
}

.fullscreen-card .collapsible-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.fullscreen-card .agenda-list {
    max-height: none;
    flex-grow: 1;
}

.animated-emoji-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
}

@keyframes fade-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.animated-emoji {
    animation: fade-in 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.archive-animation .animated-emoji-container, .delete-animation .animated-emoji-container {
    opacity: 1;
}

.archive-animation {
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    transform: translateY(20px);
    opacity: 0;
}

.delete-animation {
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    transform: translateX(-50px);
    opacity: 0;
}

.sortable-ghost {
    opacity: 0.5;
    background-color: #004d00;
    border: 2px dashed #008000;
}

.starred-item {
    background-color: #0c150c;
    box-shadow: 0 0 0 3px #00ff41;
}

/* --- ADDED FOR SCROLLBARS --- */
.agenda-list {
    max-height: 250px;
    overflow-y: auto;
    /* Padding: 5px on T/B/L for shadow, 8px on R for scrollbar */
    padding: 5px 8px 5px 5px;
}

#archived-list {
    max-height: 60vh; /* Uses viewport height for better scaling in the modal */
    overflow-y: auto;
    padding-right: 8px;
}

/* --- Custom Scrollbar Styling (Matrix Theme) --- */
.agenda-list::-webkit-scrollbar,
#archived-list::-webkit-scrollbar {
    width: 8px;
}

.agenda-list::-webkit-scrollbar-track,
#archived-list::-webkit-scrollbar-track {
    background: #0a110a;
    border-radius: 4px;
}

.agenda-list::-webkit-scrollbar-thumb,
#archived-list::-webkit-scrollbar-thumb {
    background-color: #008000;
    border-radius: 4px;
}

/* --- Custom Scrollbar Styling (Blue Theme) --- */
.blue-theme .agenda-list::-webkit-scrollbar-track,
.blue-theme #archived-list::-webkit-scrollbar-track {
    background: #0a192f;
}

.blue-theme .agenda-list::-webkit-scrollbar-thumb,
.blue-theme #archived-list::-webkit-scrollbar-thumb {
    background-color: #233554;
}

.blue-theme .agenda-list::-webkit-scrollbar-thumb:hover,
.blue-theme #archived-list::-webkit-scrollbar-thumb:hover {
    background-color: #58a6ff;
}
.agenda-textarea {
    resize: none;
    overflow-y: hidden;
}