document.addEventListener('DOMContentLoaded', function () {
// --- Quotes Database ---
const quotes = [
{ quote: "The happiness of your life depends upon the quality of your thoughts.", author: "Marcus Aurelius" },
{ quote: "Waste no more time arguing about what a good man should be. Be one.", author: "Marcus Aurelius" },
{ quote: "You have power over your mind – not outside events. Realize this, and you will find strength.", author: "Marcus Aurelius" },
{ quote: "It is not death that a man should fear, but he should fear never beginning to live.", author: "Marcus Aurelius" },
{ quote: "The best revenge is to be unlike him who performed the injury.", author: "Marcus Aurelius" },
{ quote: "Difficulties strengthen the mind, as labor does the body.", author: "Seneca" },
{ quote: "We suffer more often in imagination than in reality.", author: "Seneca" },
{ quote: "It is not the man who has too little, but the man who craves more, that is poor.", author: "Seneca" },
{ quote: "Wherever there is a human being, there is an opportunity for a kindness.", author: "Seneca" },
{ quote: "No man is free who is not master of himself.", author: "Epictetus" },
{ quote: "First say to yourself what you would be; and then do what you have to do.", author: "Epictetus" },
{ quote: "It's not what happens to you, but how you react to it that matters.", author: "Epictetus" },
{ quote: "Wealth consists not in having great possessions, but in having few wants.", author: "Epictetus" },
{ quote: "He who laughs at himself never runs out of things to laugh at.", author: "Epictetus" },
{ quote: "The key is to keep company only with people who uplift you, whose presence calls forth your best.", author: "Epictetus" },
{ quote: "The universe is change; our life is what our thoughts make it.", author: "Marcus Aurelius" },
{ quote: "Begin at once to live, and count each separate day as a separate life.", author: "Seneca" },
{ quote: "If you want to improve, be content to be thought foolish and stupid.", author: "Epictetus" },
{ quote: "What is the point of dragging up sufferings that are over, of being miserable now because you were miserable then?", author: "Seneca" },
{ quote: "To be evenminded is the greatest virtue.", author: "Heraclitus" },
{ quote: "The willing soul Fate guides, the unwilling drags.", author: "Cleanthes" },
{ quote: "Associate with people who are likely to improve you.", author: "Seneca" },
{ quote: "The art of living is more like wrestling than dancing.", author: "Marcus Aurelius" },
{ quote: "Be tolerant with others and strict with yourself.", author: "Marcus Aurelius" },
{ quote: "A gem cannot be polished without friction, nor a man perfected without trials.", author: "Seneca" },
{ quote: "He who is brave is free.", author: "Seneca" },
{ quote: "Focus on your sphere of control: your own thoughts and actions.", author: "Epictetus" },
{ quote: "Live in agreement with nature.", author: "Zeno of Citium" },
{ quote: "The obstacle is the way.", author: "Marcus Aurelius" },
{ quote: "Service to others is the rent you pay for your room here on Earth.", author: "Muhammad Ali" },
{ quote: "Very little is needed to make a happy life; it is all within yourself, in your way of thinking.", author: "Marcus Aurelius" },
{ quote: "When you arise in the morning, think of what a precious privilege it is to be alive—to breathe, to think, to enjoy, to love.", author: "Marcus Aurelius" },
{ quote: "The soul becomes dyed with the color of its thoughts.", author: "Marcus Aurelius" },
{ quote: "If it is not right, do not do it; if it is not true, do not say it.", author: "Marcus Aurelius" },
{ quote: "The impediment to action advances action. What stands in the way becomes the way