body {
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #2c3e50;
    background-image: url('https://www.transparenttextures.com/patterns/dark-wood.png');
    color: #4b3621;
}

.container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background-color: #f5e8c9;
    background-image: url('https://www.transparenttextures.com/patterns/parchment.png');
    border-radius: 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #8b4513;
    position: relative;
}

.container::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(139, 69, 19, 0.3);
    pointer-events: none;
}

h1 {
    font-family: 'Cinzel', serif;
    text-align: center;
    color: #8b4513;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 32px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
    position: relative;
}

h1::after {
    content: "";
    display: block;
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, transparent, #8b4513, transparent);
    margin: 10px auto 0;
}

.instructions {
    text-align: center;
    color: #5d4037;
    margin-bottom: 25px;
    font-size: 18px;
    line-height: 1.5;
    padding: 0 20px;
    font-style: italic;
}

.affiliate-disclosure {
    text-align: center;
    color: #ababab;
    margin-top: 20px;
    font-size: 12px;
    line-height: 1.4;
    padding: 0 20px;
    font-style: italic;
}

.credits {
    text-align: center;
    color: #8b4513;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.5;
    padding: 0 20px;
    font-family: 'EB Garamond', serif;
    font-style: italic;
    border-top: 1px solid rgba(139, 69, 19, 0.2);
    padding-top: 15px;
}

.credits a {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.credits a:hover {
    color: #004080;
    text-decoration: underline;
}

/* Removed animated underline effect since we now have a default underline */

/* Presentation mode styles */
.presentation-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.presentation-btn {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    color: #f5e8c9;
    background-color: #8b4513;
    border: 1px solid #5d4037;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

.presentation-btn:hover {
    background-color: #5d4037;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.presentation-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.presentation-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.nav-btn {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: #8b4513;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(139, 69, 19, 0.3);
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-btn:hover {
    background-color: rgba(139, 69, 19, 0.1);
    border-color: #8b4513;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Presentation mode active styles */
.presentation-mode .reading-item {
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(20px);
    pointer-events: none;
}

.presentation-mode .reading-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.presentation-mode .book-links {
    display: none;
}

.presentation-mode .book-title {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.presentation-mode .revealed .book-title {
    opacity: 1;
}

.reading-list-container {
    position: relative;
}

/* Gradient opacity at the bottom of the scrolling area */
.reading-list-container::after {
    content: "";
    position: absolute;
    bottom: 1px;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(245, 232, 201, 0), rgba(145, 132, 101, 0.8));
    /*background-color: #000;*/
    pointer-events: none; /* Allows scrolling through the gradient */
    z-index: 100; /* Ensure the gradient appears above the content */
}

.reading-list {
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(139, 69, 19, 0.3);
    padding: 10px;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8b4513 #f5e8c9;
}

.reading-list::-webkit-scrollbar {
    width: 8px;
}

.reading-list::-webkit-scrollbar-track {
    background: #f5e8c9;
}

.reading-list::-webkit-scrollbar-thumb {
    background-color: #8b4513;
    border-radius: 10px;
    border: 2px solid #f5e8c9;
}

.reading-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(139, 69, 19, 0.2);
    transition: all 0.3s ease;
}

.reading-item:hover {
    background-color: rgba(139, 69, 19, 0.05);
    transform: translateX(3px);
}

/* Custom checkbox styling */
.read-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.reading-item {
    position: relative;
}

label {
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    text-decoration: line-through;
    text-decoration-color: transparent;
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    /*white-space: nowrap;*/
    /*overflow: hidden;*/
    /*text-overflow: ellipsis;*/
    max-width: calc(100% - 210px); /* Reserve space for the icons with 60px margin */
}

label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #8b4513;
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* On hover */
label:hover:before {
    background-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-color: #5d4037;
}

/* When the checkbox is checked */
.read-checkbox:checked + label:before {
    background-color: rgba(139, 69, 19, 0.8);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Create the checkmark */
label:after {
    content: '';
    position: absolute;
    left: 7px;
    top: 50%;
    margin-top: -7px;
    width: 6px;
    height: 12px;
    border: solid #f5e8c9;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Show the checkmark when checked */
.read-checkbox:checked + label:after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

/* Style for label text */
label {
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    color: #4b3621;
    transition: color 0.3s ease;
}

label > span {
    pointer-events: none;
}

/* Style for checked label text */
.read-checkbox:checked + label {
    color: #8b4513;
    text-decoration-color: rgba(139, 69, 19, 0.5);
    font-style: italic;
}

.hidden {
    display: none;
}

.score-container {
    position: absolute;
    top: -30px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.score-display {
    background-color: #8b4513;
    color: #f5e8c9;
    padding: 12px 20px;
    border-radius: 0;
    font-weight: normal;
    font-family: 'Cinzel', serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #5d4037;
    letter-spacing: 1px;
}

.twitter-share-btn {
    background-color: #1DA1F2;
    color: #ffffff;
    border: none;
    padding: 8px 8px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #0d8bd9;
}

.twitter-share-btn:hover {
    background-color: #0d8bd9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.twitter-share-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Style for the 10th unchecked item */
.tenth-unchecked {
    border-bottom: 2px solid #8b0000;
    position: relative;
}

@media (max-width: 768px) {
    /* Adjust gradient for tablets */
    .reading-list-container::after {
        height: 35px;
    }
}

@media (max-width: 480px) {
    .tenth-unchecked {
        border-bottom-width: 3px;
    }

    /* Adjust gradient for mobile phones */
    .reading-list-container::after {
        height: 30px;
    }
}

/* Book links styling */
.book-links {
    display: flex;
    gap: 10px;
    margin-left: 15px;
}

.book-link {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    text-decoration: none;
    color: #8b4513;
    padding: 5px 10px;
    border: 1px solid rgba(139, 69, 19, 0.3);
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
    min-width: 60px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.link-text {
    display: inline-block;
}

.link-icon {
    display: none;
}

.book-link:hover {
    background-color: rgba(139, 69, 19, 0.1);
    border-color: #8b4513;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.book-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    background-color: rgba(139, 69, 19, 0.2);
}

.goodreads-link {
    background-image: url('https://www.transparenttextures.com/patterns/parchment.png');
}

.amazon-link {
    background-image: url('https://www.transparenttextures.com/patterns/parchment.png');
}

/* Style for muted items (below the 10th unchecked item) */
.muted {
    opacity: 0.5;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.05);
}

.muted label {
    cursor: not-allowed;
    color: #8b8b8b;
}

.muted label:before {
    border-color: #aaa;
    background-color: #e5e5e5;
}

.muted .book-link {
    border-color: #aaa;
    color: #8b8b8b;
    box-shadow: none;
    pointer-events: auto;
}

.muted .link-icon {
    opacity: 0.7;
}

.muted .book-link:hover {
    background-color: rgba(139, 69, 19, 0.1);
    border-color: #8b4513;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.muted .book-link:hover .link-icon {
    opacity: 1;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 28px;
    }

    .instructions {
        font-size: 16px;
    }

    .affiliate-disclosure {
        font-size: 11px;
    }

    .credits {
        font-size: 13px;
        margin-top: 15px;
        padding-top: 12px;
    }

    /* Presentation mode responsive styles */
    .presentation-btn {
        font-size: 14px;
        padding: 8px 15px;
    }

    .nav-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .reading-item {
        flex-wrap: nowrap;
        padding: 15px 10px;
        position: relative;
    }

    label {
        flex: 1;
        margin-bottom: 0;
        font-size: 16px;
        padding-right: 80px; /* Make space for the icons */
        max-width: calc(100% - 210px); /* Reserve space for the icons with 60px margin in tablet mode */
    }

    .book-links {
        margin-left: 0;
        width: auto;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        gap: 10px;
    }

    .book-link {
        padding: 8px;
        font-size: 16px;
        min-width: 0;
        width: 36px;
        height: 36px;
    }

    .link-text {
        display: none;
    }

    .link-icon {
        display: inline-block;
        font-size: 18px;
    }

    .score-container {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        /*flex-direction: column;*/
        /*align-items: center;*/
        gap: 8px;
    }

    .score-display {
        width: 250px;
        text-align: center;
        margin: 0 auto;
    }

    .twitter-share-btn {
        padding: 12px 12px;
        font-size: 13px;
        position: absolute;
        right: 50px;
        top: 0;
    }

    .share-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px 10px;
    }

    .score-container {
        gap: 6px;
    }

    .score-display {
        width: 250px;
        padding: 10px 15px;
    }

    .twitter-share-btn {
        padding: 5px 8px;
        font-size: 12px;
        right: 10px;
    }

    h1 {
        font-size: 24px;
    }

    .instructions {
        font-size: 14px;
        padding: 0 10px;
    }

    .affiliate-disclosure {
        font-size: 10px;
        padding: 0 10px;
    }

    .credits {
        font-size: 12px;
        margin-top: 12px;
        padding: 10px 10px 0;
    }

    /* Presentation mode responsive styles */
    .presentation-controls {
        margin-bottom: 15px;
    }

    .presentation-btn {
        font-size: 12px;
        padding: 6px 12px;
        margin-bottom: 10px;
    }

    .presentation-navigation {
        gap: 10px;
    }

    .nav-btn {
        font-size: 11px;
        padding: 5px 10px;
    }

    .reading-item {
        padding: 12px 8px;
    }

    label {
        font-size: 15px;
        padding-right: 70px; /* Make space for the icons */
        max-width: calc(100% - 210px); /* Reserve space for the icons with 60px margin in tablet mode */
    }

    .book-links {
        gap: 6px;
        right: 8px;
    }

    .book-link {
        padding: 6px;
        font-size: 14px;
        width: 32px;
        height: 32px;
        min-height: 0;
    }

    .link-icon {
        font-size: 16px;
    }

    /* Improve tap target for checkboxes */
    label:before {
        width: 22px;
        height: 22px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .container {
        padding: 10px 5px;
    }

    h1 {
        font-size: 20px;
    }

    .instructions {
        font-size: 13px;
    }

    .affiliate-disclosure {
        font-size: 9px;
        margin-top: 15px;
    }

    .credits {
        font-size: 11px;
        margin-top: 10px;
        padding: 8px 5px 0;
        border-top-width: 1px;
    }

    /* Presentation mode responsive styles */
    .presentation-controls {
        margin-bottom: 10px;
    }

    .presentation-btn {
        font-size: 11px;
        padding: 5px 10px;
        margin-bottom: 8px;
    }

    .presentation-navigation {
        gap: 8px;
    }

    .nav-btn {
        font-size: 10px;
        padding: 4px 8px;
    }

    /* Adjust gradient for extra small devices */
    .reading-list-container::after {
        height: 25px;
    }

    .reading-item {
        padding: 10px 5px;
    }

    label {
        padding-right: 60px; /* Make space for the icons */
        font-size: 14px;
        max-width: calc(100% - 210px); /* Reserve space for the icons with 60px margin in extra small mode */
    }

    .book-links {
        gap: 4px;
        right: 5px;
    }

    .book-link {
        width: 28px;
        height: 28px;
        padding: 4px;
    }

    .link-icon {
        font-size: 14px;
    }

    .score-container {
        gap: 4px;
    }

    .score-display {
        font-size: 14px;
        padding: 8px 12px;
        width: 250px;
    }

    .twitter-share-btn {
        padding: 5px 8px;
        font-size: 11px;
        right: 10px;
    }
}
