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

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

body.light {
    background-color: #f4f7fa;
    color: #333;
}

body.dark {
    background-color: #121212;
    color: #ffffff;
}

header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
    transition: background-color 0.3s, color 0.3s;
}

body.light header {
    background-color: #ffffff;
}

body.dark header {
    background-color: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header img {
    width: 40px;
    margin-right: 15px;
}

header h1 {
    flex: 1;
    margin: 0;
    font-size: 1.5em;
}

body.light header h1 {
    color: #0056b3;
}

body.dark header h1 {
    color: #ffffff;
}

header button {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

body.light header button {
    color: #333;
}

body.dark header button {
    color: #ffffff;
}

body.light header button:hover {
    color: #e30613;
}

body.dark header button:hover {
    color: #4caf50;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    margin-bottom: 40px;
}

h2 {
    font-size: 1.3em;
    margin-bottom: 15px;
}

body.light h2 {
    color: #0056b3;
}

body.dark h2 {
    color: #ffffff;
}

label {
    display: block;
    margin-top: 15px;
    font-weight: 500;
}

body.light label {
    color: #555;
}

body.dark label {
    color: #bbbbbb;
}

input, select {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    box-sizing: border-box;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
}

body.light input, body.light select {
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
}

body.dark input, body.dark select {
    background-color: #333333;
    color: #ffffff;
}

body.light input:focus, body.light select:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

body.dark input:focus, body.dark select:focus {
    background-color: #444444;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

body.dark input::placeholder {
    color: #888888;
}

button {
    padding: 12px 20px;
    margin-top: 15px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1em;
    transition: background-color 0.3s, transform 0.1s, color 0.3s;
}

#add-btn {
    color: #ffffff;
}

body.light #add-btn {
    background-color: #28a745;
}

body.dark #add-btn {
    background-color: #4caf50;
}

body.light #add-btn:hover {
    background-color: #218838;
}

body.dark #add-btn:hover {
    background-color: #388e3c;
}

#add-btn:hover {
    transform: translateY(-1px);
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.controls input {
    flex: 1;
}

.controls select {
    flex: 0.5;
}

#process-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

body.light .card {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.dark .card {
    background-color: #1e1e1e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-left: 5px solid #4caf50;
}

.card:hover {
    transform: translateY(-5px);
}

body.light .card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

body.dark .card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.card h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
}

body.light .card h3 {
    color: #333;
}

body.dark .card h3 {
    color: #ffffff;
}

.card p {
    margin: 0 0 15px;
    font-size: 1em;
}

body.light .card p {
    color: #666;
}

body.dark .card p {
    color: #4caf50;
}

.card button {
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.card .copy-open {
    width: 100%;
    margin-bottom: 15px;
    color: #ffffff;
}

body.light .card .copy-open {
    background-color: #ffc107;
    color: #333;
}

body.dark .card .copy-open {
    background-color: #f44336;
}

body.light .card .copy-open:hover {
    background-color: #e0a800;
}

body.dark .card .copy-open:hover {
    background-color: #d32f2f;
}

.card .edit {
    color: #333333;
}

body.light .card .edit {
    background-color: #007bff;
    color: #ffffff;
}

body.dark .card .edit {
    background-color: #ffeb3b;
    color: #333333;
}

body.light .card .edit:hover {
    background-color: #0069d9;
}

body.dark .card .edit:hover {
    background-color: #fdd835;
}

.card .delete {
    background-color: #dc3545;
    color: #ffffff;
}

body.light .card .delete:hover {
    background-color: #c82333;
}

body.dark .card .delete {
    background-color: #f44336;
}

body.dark .card .delete:hover {
    background-color: #d32f2f;
}

.card .reminder {
    background-color: #17a2b8;
    color: #ffffff;
}

body.light .card .reminder:hover {
    background-color: #138496;
}

body.dark .card .reminder {
    background-color: #4caf50;
}

body.dark .card .reminder:hover {
    background-color: #388e3c;
}

footer {
    padding: 20px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    bottom: 0;
    z-index: 10;
    transition: background-color 0.3s, color 0.3s;
}

body.light footer {
    background-color: #ffffff;
}

body.dark footer {
    background-color: #1e1e1e;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

footer p {
    margin: 0 0 10px;
}

body.light footer p {
    color: #555;
}

body.dark footer p {
    color: #bbbbbb;
}

footer button {
    color: #ffffff;
}

body.light footer button {
    background-color: #e30613;
}

body.dark footer button {
    background-color: #4caf50;
}

body.light footer button:hover {
    background-color: #c20510;
}

body.dark footer button:hover {
    background-color: #388e3c;
}

footer img {
    width: 100px;
    margin-left: 15px;
    vertical-align: middle;
}

#menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease, background-color 0.3s;
    z-index: 15;
    overflow-y: auto;
}

body.light #menu {
    background: #ffffff;
}

body.dark #menu {
    background: #1e1e1e;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

#menu:not(.hidden) {
    right: 0;
}

#menu #menu-close {
    display: block;
    text-align: right;
    padding: 10px 20px 0;
    cursor: pointer;
    font-size: 24px;
}

body.light #menu #menu-close {
    color: #aaa;
}

body.dark #menu #menu-close {
    color: #888888;
}

body.light #menu #menu-close:hover {
    color: #333;
}

body.dark #menu #menu-close:hover {
    color: #ffffff;
}

#menu ul {
    list-style: none;
    padding: 10px 20px 30px;
    margin: 0;
}

#menu li {
    cursor: pointer;
    padding: 15px 0;
    font-size: 1.1em;
    transition: color 0.3s;
}

body.light #menu li {
    color: #333;
}

body.dark #menu li {
    color: #ffffff;
}

body.light #menu li:hover {
    color: #0056b3;
}

body.dark #menu li:hover {
    color: #4caf50;
}

#menu li span {
    margin-right: 15px;
    font-size: 1.2em;
}

#menu hr {
    border: 0;
    margin: 10px 0;
}

body.light #menu hr {
    border-top: 1px solid #eee;
}

body.dark #menu hr {
    border-top: 1px solid #333333;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 14;
    transition: opacity 0.3s, background 0.3s;
}

body.light #overlay {
    background: rgba(0, 0, 0, 0.4);
}

body.dark #overlay {
    background: rgba(0, 0, 0, 0.6);
}

#modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border-radius: 12px;
    z-index: 16;
    width: 90vw;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    transition: background-color 0.3s, color 0.3s;
    word-wrap: break-word;
    white-space: normal;
}

body.light #modal {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

body.dark #modal {
    background: #1e1e1e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

#modal .close {
    float: right;
    cursor: pointer;
    font-size: 24px;
    transition: color 0.3s;
}

body.light #modal .close {
    color: #aaa;
}

body.dark #modal .close {
    color: #888888;
}

body.light #modal .close:hover {
    color: #333;
}

body.dark #modal .close:hover {
    color: #ffffff;
}

#modal h2 {
    margin-top: 0;
}

body.light #modal h2 {
    color: #0056b3;
}

body.dark #modal h2 {
    color: #ffffff;
}

#modal p, #modal ol {
    line-height: 1.6;
}

body.light #modal p, body.light #modal ol {
    color: #555;
}

body.dark #modal p, body.dark #modal ol {
    color: #bbbbbb;
}

#modal button {
    color: #ffffff;
}

body.light #modal button {
    background-color: #28a745;
}

body.dark #modal button {
    background-color: #4caf50;
}

body.light #modal button:hover {
    background-color: #218838;
}

body.dark #modal button:hover {
    background-color: #388e3c;
}

#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 17;
    animation: slideUp 0.3s ease;
    opacity: 1;
    transition: opacity 0.3s, background-color 0.3s, color 0.3s;
    color: #ffffff;
}

body.light #toast {
    background: #333;
}

body.dark #toast {
    background: #4caf50;
}

@keyframes slideUp {
    from { bottom: -50px; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}

#toast.hidden {
    opacity: 0;
}

.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #menu {
        width: 100%;
        right: -100%;
    }

    #menu:not(.hidden) {
        right: 0;
    }

    #process-list {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }

    .controls input, .controls select {
        width: 100%;
    }

    #modal {
        width: 95vw;
        padding: 20px;
    }
}