body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

#default-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 50px;
    /* Adds space at the top */
}

#default-view.hidden {
    display: none;
}


/* Heading Styling */
#default-view h1 {
    font-size: 2.5em;
    font-family: "Protest Revolution", serif;
    font-weight: 400;
    font-style: normal;
    margin-bottom: 30px;
    /* Creates space between heading and poem list */
}

/* Poem List Styling */
#poem-list {
    list-style: none;
    padding: 0;
    width: 100%;
    max-width: 400px;
    /* Keeps list centered and neat */
    /* background: rgba(255, 255, 255, 0.1); */
    padding: 15px;
}

#poem-list li {
    margin: 15px 0;
    font-size: 1.4em;
}

#poem-list a {
    /* text-decoration: none; */
    /* color: #ff0022; */
    font-weight: bold;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}

#poem-list a:hover {
    background: rgba(0, 123, 255, 0.2);
}


.dark-mode #poem-list a {
    color: #80d8ff;
    /* Light blue */
}

.dark-mode #poem-list a:hover {
    background: rgba(128, 216, 255, 0.2);
}

/* Social Media Links */
#social-links {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

#social-links a {
    text-decoration: none;
    font-size: 1.5em;
    color: #444;
    transition: transform 0.3s ease;
}

#social-links a:hover {
    transform: scale(1.1);
    color: #007BFF;
}

#content {
    text-align: center;
    max-width: 600px;
    padding: 20px;
}

#content.hidden {
    display: none;
}

#cover-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    margin-bottom: 20px;
}

h1 {
    font-family: "Protest Revolution", serif;
    font-weight: 400;
    font-style: normal;
    margin-bottom: 20px;
    font-size: xxx-large;
}

#audio-container {
    margin: 20px 0;

    border: none;
}

#audio-container p{
    font: small-caption;
    opacity: 0.5;
}

#audio-player {
    width: 100%;
    height: 40px;
    border: none;
    outline: none;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 20px;
}

#play-pause{
    background-color: transparent;
    border: none;
    font-size: 32px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.2s ease-in-out;
}

#poem-container {
    font-family: "monospace", cursive;
    font-weight: 500;
    font-style: italic;
}

#poem-text {
    white-space: pre-wrap;
    /* Keeps new lines */
    text-align: left;
    font-size: 1.3em;
    line-height: 1.8;
    /* Adjusts line spacing */
    word-spacing: 5px;
    /* Increases space between words */
    letter-spacing: 1px;
    /* (Optional) Slightly increases letter spacing */
}

.top-right-container {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    /* Spacing between home button and toggle */
}

/* Home Button Styling */
#home-button {
    text-decoration: none;
    font-size: 22px;
    /* background: rgba(255, 255, 255, 0.2); */
    padding: 8px;
    border-radius: 50%;
    transition: transform 0.2s ease-in-out, background 0.3s ease-in-out;
}

#home-button:hover {
    transform: scale(1.2);
    /* background: rgba(255, 255, 255, 0.4); */
}




#theme-toggle {
    background-color: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.2s ease-in-out;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

.light-mode #theme-toggle {
    color: #333;
}

.dark-mode #theme-toggle {
    color: #f5f5f5;
}

/* Light and Dark Mode Styles */
.light-mode {
    background-color: #ffffff;
    color: #000000;
}

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


/* (everything you already had stays as-is above this line) */


/* --------------------------------
   Poem grid + card styling
----------------------------------- */

/* Grid layout stays (if you already have this, keep it) */
.poem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1000px;
    padding: 0 20px 40px;
    box-sizing: border-box;
}

/* Card with deeper shadow */
.poem-card {
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 14px 14px 16px;
    text-align: left;
    box-shadow: -2px 15px 45px rgba(0, 0, 0, 0.35);
    transition: transform 0.23s ease, box-shadow 0.23s ease;
}

.dark-mode .poem-card {
    background: rgba(15, 15, 15, 0.9);
}

.poem-card::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 14px;
    /* border: 1px solid rgba(0, 0, 0, 0.06); */
    pointer-events: none;
}

.dark-mode .poem-card::before {
    border-color: rgba(255, 255, 255, 0.08);
}

.poem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* 200×200 image box */

.poem-image-link {
    display: block;
    margin-bottom: 12px;
}

.poem-image-wrapper {
    width: 250px;
    height: 200px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.3), transparent 55%),
                linear-gradient(135deg, rgba(0,0,0,0.1), rgba(0,0,0,0.35));
}

.poem-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: saturate(1.05);
}

.poem-card:hover .poem-image {
    transform: scale(1.1);
    filter: saturate(1.25);
}

/* Placeholder for missing image */

.poem-placeholder {
    display: none;
    font-family: "Space Mono", monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.poem-image-wrapper.no-image .poem-image {
    display: none;
}

.poem-image-wrapper.no-image .poem-placeholder {
    display: block;
}

/* Title & meta (keep or tweak your existing ones) */

.poem-title {
    display: flex;
    justify-content: center;
    margin: 10px 2px 6px;
    font-family: "Protest Revolution", monospace;
    font-size: 1.25rem;
    font-weight: 200;
    letter-spacing: 0.03em;
}

.poem-title a {
    text-decoration: none;
    color: inherit;
}

.poem-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-family: "Space Mono", monospace;
    font-size: 0.85rem;
}

.audio-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    /* font-size: 18px; */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    transition: background 0.2s ease, transform 0.15s ease;
}

.dark-mode .audio-btn {
    background: rgba(255, 255, 255, 0.14);
    color: #f5f5f5;
}

.audio-btn:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.18);
}

.dark-mode .audio-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.audio-link {
    text-decoration: none;
    opacity: 0.7;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.audio-link:hover {
    opacity: 1;
    text-decoration: underline;
}

#home-button {
    text-decoration: none;
    padding: 6px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-in-out, background 0.3s ease-in-out;
}

#home-button:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.04);
}

.dark-mode #home-button:hover {
    background: rgba(255, 255, 255, 0.06);
}

.home-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}


#theme-toggle {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
}

#theme-toggle:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.04);
}

.dark-mode #theme-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.theme-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Start with sun visible, moon hidden */
.sun-icon { display: block; }
.moon-icon { display: none; }

/* When in dark mode, swap */
.dark-mode .sun-icon { display: none; }
.dark-mode .moon-icon { display: block; }


/* ============================================================
   RESPONSIVE LAYOUT (MOBILE + TABLET)
   ============================================================ */

/* General mobile improvements */
@media (max-width: 768px) {

    body {
        padding-top: 60px; /* makes room for home + theme icons */
    }

    .top-right-container {
        top: 12px;
        right: 12px;
        gap: 12px;
    }

    #home-button,
    #theme-toggle {
        padding: 10px;
    }

    /* Make header smaller but still elegant */
    #default-view h1 {
        font-size: 2rem;
        text-align: center;
        padding: 0 10px;
        line-height: 1.2;
    }

    /* Grid becomes 2 columns or 1 depending on width */
    .poem-grid {
grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 16px 32px;
    }

    /* Card spacing refinement */
    .poem-card {
        padding: 14px;
        border-radius: 16px;
    }

    /* Image wrapper scales slightly smaller on mobile */
    .poem-image-wrapper {
        width: 160px;
        height: 160px;
    }

    .poem-title {
        font-size: 1.1rem;
    }

    .audio-btn {
        width: 30px;
        height: 30px;
        /* font-size: 16px; */
    }
}

/* Very small screens (phones in portrait) */
@media (max-width: 480px) {

    #default-view h1 {
        font-size: 1.7rem;
    }

    .poem-grid {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 0 14px 30px;
    }

    .poem-card {
        border-radius: 14px;
        padding: 12px;
    }

    .poem-image-wrapper {
        width: 150px;
        height: 150px;
    }

    .poem-title {
        font-size: 1.05rem;
    }
}
