/* My List Page Styles */

/* Ensure full height layout */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Flex container to push footer down */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Make the main section expand */
main {
    flex: 1;
}

/* Optional: Add a little spacing above the footer */
footer {
    margin-top: 2rem;
}


/* Petal canvas styling */
#petal-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Header */
.my-list-header {
    margin: 40px 0 30px;
    text-align: center;
}

.my-list-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #FFFFFF;
}

.my-list-header p {
    font-size: 1.1rem;
    color: #BBBBBB;
}

/* List Controls */
.list-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    padding: 15px;
    background: #1E1E1E;
    border-radius: 8px;
    border: 1px solid #F0C1D3; /* Light pink border */
}

.list-filter select,
.list-sort select {
    background: #351D23; /* Pink-tinted dark background */
    color: #FFFFFF;
    border: 1px solid #E5A8B7; /* Pink border */
    padding: 10px 15px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    font-size: 0.95rem;
}

/* Empty List State */
.empty-list {
    text-align: center;
    padding: 80px 20px;
    margin: 40px 0;
    background: #1E1E1E;
    border-radius: 8px;
    border: 1px solid #F0C1D3; /* Light pink border */
}

.empty-list-icon {
    font-size: 4rem;
    color: #E5A8B7; /* Pink icon */
    margin-bottom: 20px;
}

.empty-list h2 {
    font-size: 1.8rem;
    color: #FFFFFF;
    margin-bottom: 15px;
}

.empty-list p {
    font-size: 1.1rem;
    color: #BBBBBB;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.primary-button {
    background: #E5A8B7; /* Pink button */
    color: #121212;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    transition: background 0.3s;
}

.primary-button:hover {
    background: #D192A3; /* Darker pink on hover */
}

/* Manga List Table */
.manga-list-table {
    background: #1E1E1E;
    border-radius: 8px;
    border: 1px solid #F0C1D3; /* Light pink border */
    overflow: hidden;
    margin-bottom: 40px;
}

.list-table-header {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr 1fr 100px;
    background: #351D23; /* Pink-tinted dark background */
    padding: 15px;
    font-weight: 600;
    color: #FFFFFF;
}

.list-table-body {
    max-height: 800px;
    overflow-y: auto;
}

.list-item {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr 1fr 100px;
    padding: 15px;
    border-bottom: 1px solid #F0C1D3; /* Light pink border */
    align-items: center;
    transition: background 0.2s;
}

.list-item:hover {
    background: #2C1D21; /* Pink-tinted hover background */
}

.list-item:last-child {
    border-bottom: none;
}

.list-cell {
    padding: 0 10px;
}

.cell-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.manga-cover-small {
    width: 50px;
    height: 70px;
    border-radius: 3px;
    overflow: hidden;
}

.manga-cover-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cell-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.manga-title-main {
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manga-title-details {
    font-size: 0.8rem;
    color: #BBBBBB;
}

.cell-score {
    font-weight: 600;
    color: #FFFFFF;
}

.score-value {
    padding: 3px 8px;
    background: #351D23; /* Pink-tinted dark background */
    border-radius: 3px;
    display: inline-block;
}

.cell-progress {
    color: #BBBBBB;
}

.cell-status {
    color: #BBBBBB;
}

.cell-status .status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    display: inline-block;
}

.status-reading {
    background: #C29BAC; /* Pink-tinted status colors */
    color: white;
}

.status-completed {
    background: #93AE91;
    color: white;
}

.status-on-hold {
    background: #DE9B80;
    color: white;
}

.status-dropped {
    background: #DB8587;
    color: white;
}

.status-plan-to-read {
    background: #B1B592;
    color: white;
}

.cell-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #351D23; /* Pink-tinted dark background */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.action-icon:hover {
    background: #452B31; /* Lighter pink-tinted background on hover */
}

.action-icon i {
    color: #E5A8B7; /* Pink icon */
    font-size: 0.9rem;
}

/* Edit Modal */
.edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1E1E1E;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #E5A8B7; /* Pink border */
}

.modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #F0C1D3; /* Light pink border */
}

.modal-header h2 {
    color: #FFFFFF;
    font-size: 1.5rem;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: #BBBBBB;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #E5A8B7; /* Pink on hover */
}

.modal-body {
    padding: 20px;
}

.edit-manga-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #F0C1D3; /* Light pink border */
}

.edit-manga-cover {
    width: 100px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}

.edit-manga-cover img {
    width: 100%;
    display: block;
}

.edit-manga-details {
    flex-grow: 1;
}

.edit-manga-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 5px;
}

.edit-manga-subtitle {
    font-size: 0.9rem;
    color: #BBBBBB;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #FFFFFF;
    font-weight: 600;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #351D23; /* Pink-tinted dark background */
    border: 1px solid #E5A8B7; /* Pink border */
    border-radius: 5px;
    color: #FFFFFF;
    font-size: 1rem;
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.progress-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-input input {
    width: 80px;
}

.progress-input span {
    color: #BBBBBB;
}

.modal-footer {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #F0C1D3; /* Light pink border */
}

.delete-button {
    background: transparent;
    border: 1px solid #F94144;
    color: #F94144;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.delete-button:hover {
    background: rgba(249, 65, 68, 0.1);
}

.save-button {
    background: #E5A8B7; /* Pink button */
    color: #121212;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.save-button:hover {
    background: #D192A3; /* Darker pink on hover */
}

/* Media Queries */
@media (max-width: 768px) {
    .list-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .list-table-header {
        display: none;
    }
    
    .list-item {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .cell-cover {
        justify-content: flex-start;
    }
    
    .cell-title .manga-title-main {
        grid-column: 2;
        margin-top: 5px;
    }
    
    .cell-title .manga-title-details {
        grid-column: 2;
    }
    
    .manga-cover-small {
        grid-row: span 2;
        margin-right: 15px;
    }
    
    .cell-score::before,
    .cell-progress::before,
    .cell-status::before {
        content: attr(data-label);
        font-weight: 600;
    }
    
    .cell-actions {
        justify-content: flex-start;
    }
    
    .edit-manga-info {
        flex-direction: column;
    }
    
    .edit-manga-cover {
        width: 120px;
        margin: 0 auto;
    }
}