.message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    font-size: 1.1rem;
}

.message p {
    margin: 10px 0;
    line-height: 1.6;
}

.error-message {
    color: var(--burgundy);
    background: rgba(114, 47, 55, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--burgundy);
}

.empty-message {
    grid-column: 2 / 3;
    justify-self: start;
    align-self: center;
    position: relative;
    background: var(--aged-paper);
    border: 1px solid var(--burnished-gold);
    border-radius: 8px;
    padding: 1.5rem;
    margin-left: 2rem;
    width: 250px;
    color: var(--ink-medium);
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.empty-message::after,
.empty-message::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.empty-message::after {
    border-right: 10px solid var(--burnished-gold); 
}

.empty-message::before {
    border-right: 10px solid var(--aged-paper); 
    margin-right: 2px; 
    z-index: 1;
}

.info-message {
    color: var(--burnished-gold);
}

.characters-container {
    max-width: 1200px;
    margin: 1rem auto;
    padding-top: 0;
    padding-bottom: 0;
}

.characters-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.characters-title {
    font-size: 2.8rem;
    color: var(--deep-gold);
    text-shadow: 2px 2px 8px var(--shadow-dark);
}

.user-characters-section {
    background-image: url("../assets/background/parchment.001.webp");
    border: 3px solid var(--deep-gold);
    border-radius: 20px;
    padding: 3rem;
    padding-top: 1rem;
    color: var(--ink-dark);
    box-shadow: 0 10px 30px var(--shadow-dark);
}

.user-characters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--aged-paper);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.user-characters-title {
    font-size: 2rem;
    color: var(--burgundy);
    margin: 0;
}

.character-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.character-card {
    border: 2px solid var(--aged-paper);
    border-radius: 10px;
    background-color: var(--dark-parchment);
    transition: all 0.3s ease;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 10px 20px var(--shadow-dark);
    position: relative;
    display: flex;
    flex-direction: column;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-dark), 0 0 20px var(--glow-gold);
    border-color: var(--burnished-gold);
}

.character-thumbnail {
    width: 100%;
    height: 150px;
    background-color: var(--aged-paper);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: var(--ink-medium);
    padding: 1rem;
    text-align: center;
    font-size: 1.3rem;
    color: var(--parchment);
}

.character-card-info {
    padding: 1rem;
    position: relative;
    flex-grow: 1;
}

.character-card-info::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    background-image: linear-gradient(to right, rgba(0,0,0,0.1) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0,0,0,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.character-card-info .character-card-title {
    font-size: 1.4rem;
    color: var(--ink-dark);
    margin: 0 0 0.25rem 0;
    position: relative;
}

.character-card-info .character-card-date {
    font-size: 0.9rem;
    color: var(--ink-medium);
    margin: 0;
    position: relative;
}

.new-character-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 3px dashed var(--aged-paper);
    border-radius: 10px;
    background-color: rgba(210, 195, 160, 0.1);
    color: var(--ink-medium);
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 254px;
}

.new-character-card:hover {
    background-color: rgba(210, 195, 160, 0.2);
    border-color: var(--burnished-gold);
    color: var(--deep-gold);
}

.new-character-content .icon {
    font-size: 4rem;
    line-height: 1;
    font-weight: 300;
}

.new-character-content .text {
    font-size: 1.2rem;
    margin-top: 1rem;
}

.character-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.character-card:hover .character-card-actions {
    opacity: 1;
}

.delete-character-btn {
    background: linear-gradient(135deg, rgba(114, 47, 55, 0.9), rgba(139, 69, 19, 0.9));
    border: 2px solid var(--burgundy);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--parchment);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.delete-character-btn:hover {
    background: linear-gradient(135deg, var(--burgundy), #8b4513);
    transform: scale(1.15);
    box-shadow: 0 6px 15px rgba(114, 47, 55, 0.6);
}

.delete-character-btn i {
    pointer-events: none;
}

#character-notices {
    margin: 0 0 1.5rem 0;
}

#character-notices .notice {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.new-character-card.limit-reached {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.new-character-card.limit-reached .text {
    color: var(--burgundy);
    font-weight: 700;
}

@media (max-width: 768px) {
    .character-thumbnail {
        font-size: 2rem;
        height: 100px;
    }

    .delete-character-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .message {
        padding: 30px 15px;
        font-size: 1rem;
    }
}