/* General Body */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-bottom: 100px;
    background: #f0f0f0;
    overflow-x: hidden;
    color: black;
}

/* Dark Mode */
body.dark-mode {
    background: #121212;
    color: white;
}

/* Navbar */
.navbar {
    background: #21295C;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    box-sizing: border-box;
}

.navbar button {
    padding: 8px 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    margin-left: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.navbar button:hover {
    background: #45a049;
}

/* Welcome Section */
.welcome {
    max-width: 900px;
    padding: 30px;
    margin: 30px auto;
    border-radius: 12px;
    background: white;
    color: black;
    font-size: 17px;
    line-height: 1.8;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: fadeIn 1.5s ease forwards;
}

body.dark-mode .welcome {
    background: #1e1e1e;
    color: white;
    border: 1px solid #444;
}

/* Goals */
.goal-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 40px auto;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .goal-container {
    background: #1e1e1e;
    color: white;
    border: 1px solid #333;
}

/* Chunks */
.goal-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.chunk {
    width: 55px;
    height: 55px;
    font-size: 32px;
    text-align: center;
    line-height: 55px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.chunk.completed { background: #a5d6a7; transform: scale(1.15); }
.chunk.pending { background: #eee; }
.chunk.deducted { background: #FFCDD2; opacity: 0.8; }

/* Progress bar */
.progress-bar {
    width: 90%;
    height: 20px;
    background: #ddd;
    margin: 15px auto;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(145deg, #76c7c0, #4caf50);
    transition: width 0.3s;
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    z-index: 9999;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    opacity: 1;
    transition: opacity 1.5s;
}

.toast.success { background: rgba(76, 175, 80, 0.95); }
.toast.error { background: rgba(244, 67, 54, 0.95); }
.toast.info { background: rgba(33, 150, 243, 0.95); }

.toast.fade-out { opacity: 0; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.modal-content img {
    max-width: 200px;
    margin: 15px auto;
    display: block;
}

.modal-content button {
    margin: 10px 5px 0 5px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
}

.modal-content button:first-of-type { background: #4CAF50; color: white; }
.modal-content button:last-of-type { background: #f44336; color: white; }

body.dark-mode .modal-content { background: #1e1e1e; color: white; }

/* Donation Footer */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #21295C;
    color: white;
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    z-index: 1000;
    box-sizing: border-box;
}

.footer-left a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.footer-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.crypto-option {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 12px;
}

.crypto-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.crypto-option img {
    width: 18px;
    height: 18px;
}

/* Dark Mode Footer */
body.dark-mode .footer {
    background: #1e1e1e;
}

body.dark-mode .crypto-option {
    background: rgba(0, 0, 0, 0.4);
}

body.dark-mode .crypto-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fix Buttons in Modals */
.modal-content button {
    margin-top: 15px;
}

/* Forms focus */
button, input {
    outline: none;
}

button:focus, input:focus {
    box-shadow: 0 0 0 2px #4CAF50;
}

/* Adjust body padding for footer */
body {
    padding-bottom: 100px;
}
