.art-gallery-main .content-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

#main-content-column-1 {
    border-radius: 10px;
    margin: 10px;
    margin-right: 25px;
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;

    position: relative;
    border-radius: 32px;
    background: linear-gradient(135deg, #ffffff 50%, #9dcdff 100%);
    border: 6px solid #00c8ff;
    box-shadow: 0 24px 60px rgb(155 203 225 / 60%);
    padding: 20px 35px;
    margin-top: 20px;
    margin-bottom: 20px;
}

h1 {
    font-size: 18px;
    margin: 0;
}

.art-gallery-header-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.art-gallery-back-link {
    color: #4d77ff !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}
.art-gallery-back-link:hover { color: #00c8ff; }

.art-gallery-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.art-gallery-title-icon { font-size: 1.8rem; }
.art-gallery-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #303030;
    margin: 0;
    text-shadow: 0 0 12px rgba(77,119,255,0.5);
}
.art-gallery-owner-nick {
    font-size: 1rem;
    color: #464646;
    font-style: italic;
}
.art-gallery-new-btn {
    align-self: flex-start;
    background: linear-gradient(135deg, #4d77ff, #00c8ff);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}
.art-gallery-new-btn:hover { opacity: 0.88; }

.art-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    min-height: 400px;
}

.art-gallery-card {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.92);
    border: 3px solid #a78bfa;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none !important;
    color: #2d3748;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}
.art-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(167,139,250,0.35);
}
.art-gallery-card--empty {
    background: rgba(255,255,255,0.1);
    border: 2px dashed rgba(167,139,250,0.2);
    pointer-events: none;
    min-height: 160px;
}
.art-gallery-card-thumb-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f5f0ff;
    overflow: hidden;
    position: relative;
}
.art-gallery-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.art-gallery-card-thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #ede9ff;
}

.art-gallery-card-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.art-gallery-badge {
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 6px;
    padding: 2px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}

.art-gallery-badge--finished {
    background: rgba(72,187,120,0.85);
    color: #fff;
}
.art-gallery-badge--incomplete {
    background: rgba(237,137,54,0.85);
    color: #fff;
}

.art-gallery-card-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.art-gallery-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #7c3aed;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.art-gallery-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.art-gallery-tag {
    font-size: 0.65rem;
    background: rgba(167,139,250,0.15);
    color: #7c3aed;
    border-radius: 6px;
    padding: 2px 7px;
    font-weight: 600;
}
.art-gallery-card-date {
    font-size: 0.72rem;
    color: #a0aec0;
}

.art-gallery-empty-state, .art-gallery-loading, .art-gallery-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 4rem 1rem;
    color: #4a5568;
    text-align: center;
}
.art-gallery-empty-icon { font-size: 3rem; opacity: 0.4; }
.art-gallery-empty-text { font-size: 1rem; line-height: 1.6; color: #464646; }
.art-gallery-start-link {
    color: #7c3aed;
    font-weight: 700;
    text-decoration: underline;
}

.art-gallery-start-link:hover {
    color: #5f0ee9 !important;
}

.art-gallery-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.art-gallery-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    border: 2px solid rgba(124,58,237,0.3);
    background: rgba(255,255,255,0.85);
    color: #7c3aed;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: background 0.15s, border-color 0.15s;
}
.art-gallery-page-btn:hover:not(:disabled) {
    background: rgba(167,139,250,0.15);
    border-color: #a78bfa;
}
.art-gallery-page-btn--active {
    background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
    border-color: #a78bfa !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(167,139,250,0.4);
}
.art-gallery-page-btn:disabled { opacity: 0.4; cursor: default; }


@media only screen and (orientation: portrait), (max-aspect-ratio: 4/3) {

    .art-gallery-main .content-container {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden;
    }

    #main-content-column-1 {
        width: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        
        margin: 10px 8px !important;
        margin-top: 20px !important;
        margin-bottom: 20px !important;
        padding: 20px 14px !important;
        border-radius: 24px !important;
        border-width: 4px !important;
        box-shadow: 0 16px 40px rgb(155 203 225 / 50%) !important;
    }

    .art-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        min-height: 200px;
        margin: 0px 10px;
    }

    .art-gallery-card {
        border-width: 2px;
        border-radius: 12px;
    }

    .art-gallery-card--empty {
        min-height: 120px;
    }

    .art-gallery-card-thumb-wrap {
        aspect-ratio: 16 / 10;
    }

    .art-gallery-card-info {
        padding: 7px 9px;
        gap: 3px;
    }

    .art-gallery-card-title {
        font-size: 0.80rem;
    }

    .art-gallery-card-tags {
        gap: 3px;
    }

    .art-gallery-tag {
        font-size: 0.58rem;
        padding: 1px 5px;
    }

    .art-gallery-card-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .art-gallery-card-date {
        font-size: 0.65rem;
    }

    .art-gallery-badge {
        font-size: 0.58rem;
        padding: 1px 5px;
    }

    .art-gallery-pagination {
        margin-top: 20px;
        gap: 4px;
    }

    .art-gallery-page-btn {
        min-width: 30px;
        height: 30px;
        padding: 0 6px;
        font-size: 0.82rem;
        border-width: 2px;
    }

    .art-gallery-empty-state,
    .art-gallery-loading,
    .art-gallery-empty {
        padding: 2.5rem 1rem;
        gap: 10px;
    }

    .art-gallery-empty-icon {
        font-size: 2.2rem;
    }

    .art-gallery-empty-text {
        font-size: 0.85rem;
    }

    .art-gallery-start-link {
        font-size: 0.85rem;
    }
}

@media only screen and (max-width: 1024px) and (orientation: landscape) {

    .art-gallery-main .content-container {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden;
    }

    #main-content-column-1 {
        width: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        
        margin: 10px 12px !important;
        margin-top: 20px !important;
        margin-bottom: 20px !important;
        padding: 20px 24px !important;
        border-radius: 28px !important;
        border-width: 5px !important;
    }

    .art-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin: 0px 10px;
    }

    .art-gallery-card-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}