/* ===== Profile Page Styles ===== */

#profile-container {
    max-width: 1120px;
    width: 100%;
    margin: 80px auto 40px;
    padding: 0 20px;
    text-align: left;
    box-sizing: border-box;
}

#profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #eee;
    justify-content: flex-start;
}

#avatar-container {
    position: relative;
    display: inline-block;
}

#avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

#avatar-container:hover #avatar-overlay {
    opacity: 1;
}

#avatar-edit-btn {
    background: white;
    border: none;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

#avatar-edit-btn:hover {
    background: #f0f0f0;
}

#avatar-img {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    border: 3px solid #ddd;
    object-fit: cover;
}

#profile-info h1 {
    margin: 0;
    font-size: 28px;
}

#profile-info p {
    margin: 8px 0 0;
    color: #666;
}

/* Mini Nav */
.mini-nav {
    display: flex;
    gap: 12px;
    margin: 20px 0 24px 0;
    padding: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 16px;
}

.mini-nav-link {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.mini-nav-link:hover {
    background: #e0e0e0;
    color: #333;
}

.mini-nav-link.active {
    background: #4A90D9;
    color: white;
    border-color: #4A90D9;
}

.mini-nav-link.active:hover {
    background: #3a7bc8;
    border-color: #3a7bc8;
}

.page-content {
    padding: 0px 40px 0 40px;
    max-width: 1400px;
    margin: 0 auto; 
    box-sizing: border-box;
    width: 100%;
}

#drawings-grid {
    width: 100%;
    box-sizing: border-box;
}

.drawings-grid-container {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    justify-content: flex-start;
    max-width: 1080px; 
    padding: 20px 0;
}

.drawing-card {
    flex: 0 0 200px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    padding-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid #eee;
}

.drawing-card:hover {
    transform: scale(1.02);
}

.drawing-card .thumbnail-stack {
    position: relative;
    width: 200px;
    height: 150px;
    margin: 0 auto;
}

.drawing-card .thumbnail-stack .layer-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 150px;
    display: block;
    border-radius: 0;
}

.drawing-card p {
    margin: 8px 0 0;
    font-size: 13px;
    color: #666;
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 20px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #f0f0f0;
}

.page-btn.active {
    background: #4A90D9;
    color: white;
    border-color: #4A90D9;
}

/* Match Page */
.match-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.match-title {
    font-size: 24px;
    font-weight: normal;
    margin: 0 0 10px 0;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 10px;
    transition: transform 0.2s;
    margin-bottom: 20px;
}


.match-drawings {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: nowrap;
    margin-bottom: 20px;
}

.drawing-wrapper {
    text-align: center;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex: 0 0 auto;
}

.drawing-wrapper h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #333;
}

.drawing-wrapper canvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    display: block;
    max-width: 100%;
    height: auto;
}

.match-checkbox {
    text-align: center;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.match-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.match-checkbox label {
    cursor: pointer;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .match-drawings {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }
    
    .drawing-wrapper canvas {
        width: 100%;
        height: auto;
    }
}

.main-page-content {
    max-width: 1120px;
    padding: 0 20px;
    margin: 0 auto;
}