:root {
    --card-bg: rgba(255, 255, 255, 0.75);
}

.container {
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

#error {
    color: #ff4d4d;
    display: none;
    padding: 20px;
    background: rgba(255, 77, 77, 0.1);
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.art-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 214, 230, 0.7);
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: scaleUpFadeIn 0.5s ease-out;
}

.art-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 157, 0.2);
}

.art-thumbnail-container {
    position: relative;
    overflow: hidden;
}

.art-thumbnail {
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.art-card:hover .art-thumbnail {
    transform: scale(1.05);
}

.art-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.art-header {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.art-title {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.art-artist {
    display: flex;
    align-items: center;
    gap: 10px;
}

.artist-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color2);
}

.artist-name {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.art-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: #777;
    font-size: 0.85rem;
    margin-top: auto;
}

.refresh-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 24px;
    background: linear-gradient(45deg, var(--accent-color), var(--accent-color2));
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(255, 107, 157, 0.2);
}

.refresh-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(255, 107, 157, 0.3);
}

#loading, #error {
    text-align: center;
    margin: 20px 0;
    font-size: 1.2rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-art-container {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 30px;
    width: 100%;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-art-header {
    display: flex;
    justify-content: space-between;
    margin: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-art-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.modal-artist {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ddd;
}

.modal-artist-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color2);
}

.modal-image-container {
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.modal-art-image {
    max-width: 100%;
    max-height: 60vh;
    min-height: 30vh;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    display: block;
    margin: 0 auto;
}

.page-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.page-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.page-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: var(--accent-color2);
    transform: scale(1.1);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.modal-text {
    margin: 20px 0;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.modal-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag-modal {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-art-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(45deg, var(--accent-color), var(--accent-color2));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: bold;
    text-align: center;
    flex-grow: 1;
}

.modal-art-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

.modal-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1010;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.1);
}

.empty-description {
    display: none;
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--accent-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.artist-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    animation: slideUpFadeIn 0.8s ease-out;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.profile-name {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--accent-color), var(--accent-color2));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#modalArtist:hover {
    transform: translateY(-3px);
    color:  var(--accent-color);
}

#modalArtist:hover #modalArtistAvatar {
    border: 2px solid var(--accent-color);
}