:root {
  --wk-purple: #6b45ff;
  --wk-yellow: #ffd84d;
  --wk-orange: #ff6b00;
  --wk-light-blue: #7ee8fa;
  --wk-text: #3d3d3d;
  --wk-border-color: #e5e0ff;
}

/* --- Dashboard Layout --- */
.my-studio-dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .my-studio-dashboard {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* --- Sidebar / User Profile --- */
.my-studio-sidebar {
    flex-shrink: 0;
    width: 100%;
}
@media (min-width: 768px) {
    .my-studio-sidebar {
        width: 280px;
    }
}

.user-profile-card {
    background: #f9f8ff;
    border-radius: 20px;
    padding: 25px;
    border: 2px solid var(--wk-border-color);
    text-align: center;
}

.user-profile-name {
    font-family: 'Luckiest Guy', sans-serif;
    color: var(--wk-purple);
    font-size: 1.8rem;
    margin: 0 0 20px 0;
}

.user-stats-grid {
    display: grid;
    gap: 15px;
}

.user-stat-item {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--wk-border-color);
}

.user-stat-value {
    display: block;
    font-family: 'Luckiest Guy', sans-serif;
    font-size: 2rem;
    color: var(--wk-purple);
    line-height: 1;
}

.user-stat-label {
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #8a70ff;
}

/* --- Main Content Area --- */
.my-studio-main {
    flex-grow: 1;
    width: 100%;
}

.my-studio-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--wk-border-color);
}

.my-studio-tab-btn {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: none;
    padding: 10px 20px;
    font-family: 'Fredoka One', sans-serif;
    font-size: 1.1rem;
    color: #8a70ff;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transform: translateY(2px);
    transition: all 0.2s ease-in-out;
}

.my-studio-tab-btn:hover {
    color: var(--wk-purple);
}

.my-studio-tab-btn.active {
    color: var(--wk-purple);
    border-bottom-color: var(--wk-purple);
}

.my-studio-tab-content {
    display: none;
}

.my-studio-tab-content.active {
    display: block;
}

.my-studio-empty-message {
    background: #f9f8ff;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    color: var(--wk-text);
    border: 2px dashed var(--wk-border-color);
}
.my-studio-empty-message a {
    color: var(--wk-purple);
    font-weight: 700;
}


/* --- Achievements Styles --- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.achievement-card {
    background: #f7f7f7;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 3px solid #e0e0e0;
}
.achievement-card.locked { filter: grayscale(1); opacity: 0.6; }
.achievement-card.earned {
    background: #fff;
    border-color: var(--wk-yellow);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.achievement-icon { font-size: 3rem; line-height: 1; margin-bottom: 10px; }
.achievement-card.locked .achievement-icon { filter: saturate(0); }
.achievement-title { font-family: 'Fredoka', sans-serif; font-weight: 700; color: #333; font-size: 1rem; }
.achievement-card.locked .achievement-title { color: #888; }
.achievement-points {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--wk-orange);
    margin-top: 10px;
}


/* --- Gallery Styles --- */
.my-studio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.my-studio-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.my-studio-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }
.my-studio-card-image-wrapper { width: 100%; padding-top: 100%; position: relative; background-color: #fff; border-bottom: 3px solid var(--wk-light-blue); }
.my-studio-card-image { display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.my-studio-card-content { padding: 12px; text-align: center; }
.my-studio-card-title { margin: 0 0 10px; font-family: "Fredoka", sans-serif; font-size: 1rem; font-weight: 700; color: var(--wk-purple); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-studio-card-actions { display: flex; justify-content: center; gap: 8px; }
.my-studio-action-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; font-size: 1.2rem; color: var(--wk-purple); background-color: #f0f0f8; border: none; border-radius: 50%; cursor: pointer; text-decoration: none; transition: background-color 0.2s ease, transform 0.2s ease; }
.my-studio-action-btn:hover { background-color: var(--wk-yellow); transform: scale(1.1); }


/* --- Custom Gallery Modals --- */
.my-studio-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 1000; }
.my-studio-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; border-radius: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); z-index: 1001; width: 90%; max-width: 400px; padding: 25px 30px; text-align: center; }
.my-studio-modal h3 { font-family: 'Luckiest Guy', sans-serif; color: var(--wk-purple); font-size: 1.8rem; margin: 0 0 20px 0; }
.my-studio-modal-input { width: 100%; padding: 12px; border: 3px solid var(--wk-purple); border-radius: 12px; font-family: 'Fredoka', sans-serif; font-size: 1rem; margin-bottom: 20px; box-sizing: border-box; text-align: center; }
.my-studio-modal-input:focus { outline: none; border-color: var(--wk-orange); }
.my-studio-modal-actions { display: flex; gap: 12px; justify-content: center; }
.my-studio-modal-btn { flex: 1; -webkit-appearance: none; appearance: none; padding: 12px 24px; font-family: 'Fredoka One', sans-serif; font-size: 16px; cursor: pointer; border-radius: 12px; border: 1px solid transparent; transition: all .15s ease-in-out; }
.my-studio-modal-btn-confirm { background-color: var(--wk-yellow); color: var(--wk-purple); border-color: var(--wk-yellow); box-shadow: 0 4px 0 0 var(--wk-orange); }
.my-studio-modal-btn-confirm:hover { background-color: var(--wk-purple); color: white; }
.my-studio-modal-btn-cancel { background-color: #eee; color: #777; box-shadow: 0 4px 0 0 #ccc; }
.my-studio-modal-btn-cancel:hover { background-color: #e0e0e0; }


/* --- Login/Register Modal Styles (Shared & Fixed) --- */
.wk-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 9999 !important; }
.wk-modal-container {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 10000 !important;
    width: 90%;
    max-width: 400px;
    padding: 0;
    overflow: hidden; /* This is the fix! */
}
.wk-modal-close { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 2rem; color: #aaa; cursor: pointer; z-index: 10; }
.wk-modal-close:hover { color: var(--wk-purple); }
.wk-modal-tabs { display: flex; border-bottom: 1px solid #eee; }
.wk-modal-tab { flex: 1; padding: 15px; border: none; background: #f9f9f9; font-family: 'Fredoka', sans-serif; font-size: 1.1rem; font-weight: 700; color: #aaa; cursor: pointer; }
.wk-modal-tab.active { background: white; color: var(--wk-purple); border-bottom: 3px solid var(--wk-purple); }
.wk-modal-content { display: none; padding: 20px 30px 30px; }
.wk-modal-content.active { display: block; }
.wk-form-row { margin: 0 0 15px; }
.wk-form-row label { display: block; margin-bottom: 5px; font-family: 'Fredoka', sans-serif; font-weight: 600; color: #555; text-align: left; }
.wk-form-row .input { width: 100%; padding: 10px; border: 2px solid #ddd; border-radius: 8px; font-size: 1rem; transition: border-color 0.2s; }
.wk-form-row .input:focus { border-color: var(--wk-purple); outline: none; }
.wk-modal-status { margin-top: 15px; font-family: 'Fredoka', sans-serif; font-weight: 600; padding: 10px; border-radius: 8px; display: none; }
.wk-modal-status.error { background: #fff0f0; color: #d00; display: block; }
.wk-modal-status.success { background: #f0fff0; color: #0b0; display: block; }
