@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Outfit:wght@100..900&display=swap');

:root {
    --color-bg-main: #12151c;
    --color-bg-card: #1e222b;
    --color-bg-card-dark: #16191f;
    --color-bg-hover: #252b36;
    --color-border: #000000;
    --color-text-primary: #ffffff;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #4b5563;
    --color-kaplay-green: #a4e237;
    --color-kaplay-green-hover: #bcf74c;
    --color-kaplay-yellow: #ffde6a;
    --color-kaplay-peach: #f98667;
    --color-kaplay-purple: #a388ef;
    --color-kaplay-pink: #ff83ab;
    --border-width-thick: 3px;
    --border-width-thin: 2px;
    --shadow-flat: 4px 4px 0px var(--color-border);
    --shadow-flat-large: 6px 6px 0px var(--color-border);
    --shadow-flat-small: 2px 2px 0px var(--color-border);
    --transition-snappy: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    user-select: none;
    -webkit-user-select: none;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--color-bg-card);
    border: 2px solid var(--color-bg-main);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-kaplay-green);
}

svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
}

#project-manager {
    padding: 40px;
    overflow-y: auto;
    align-items: center;
    justify-content: flex-start;
}

.pm-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.pm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.pm-logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pm-logo-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: var(--color-kaplay-green);
    text-shadow: 
        -2px -2px 0 var(--color-border),  
         2px -2px 0 var(--color-border),
        -2px  2px 0 var(--color-border),
         2px  2px 0 var(--color-border),
         4px  4px 0 var(--color-border);
    letter-spacing: 0.5px;
}

.pm-logo-subtitle {
    font-size: 14px;
    font-weight: 600;
    background: var(--color-kaplay-pink);
    color: var(--color-border);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 8px;
    padding: 4px 10px;
    box-shadow: var(--shadow-flat-small);
    transform: rotate(-2deg);
}

.pm-actions {
    display: flex;
    gap: 16px;
}

.btn {
    font-family: 'Fredoka', sans-serif;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
    border: var(--border-width-thick) solid var(--color-border);
    border-radius: 12px;
    padding: 12px 24px;
    cursor: pointer;
    box-shadow: var(--shadow-flat);
    transition: var(--transition-snappy);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-flat-small);
}

.btn-primary {
    background-color: var(--color-kaplay-green);
    color: var(--color-border);
}

.btn-primary:hover {
    background-color: var(--color-kaplay-green-hover);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-flat-large);
}

.btn-secondary {
    background-color: var(--color-bg-card);
    color: var(--color-text-primary);
}

.btn-secondary:hover {
    background-color: var(--color-bg-hover);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-flat-large);
}

.btn-donate {
    background-color: var(--color-kaplay-purple);
    color: var(--color-border);
}

.btn-donate:hover {
    background-color: var(--color-kaplay-pink);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-flat-large);
}



.btn-danger {
    background-color: var(--color-kaplay-peach);
    color: var(--color-border);
    padding: 8px 12px;
    border-radius: 8px;
    border: var(--border-width-thin) solid var(--color-border);
    box-shadow: var(--shadow-flat-small);
}

.btn-danger:hover {
    transform: scale(1.05);
}

.pm-section-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.project-card {
    background-color: var(--color-bg-card-dark);
    border: var(--border-width-thick) solid var(--color-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-flat);
    transition: var(--transition-snappy);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    position: relative;
}

.project-card:hover {
    background-color: var(--color-bg-card);
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-flat-large);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-icon-wrapper {
    width: 48px;
    height: 48px;
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka', sans-serif;
    font-weight: 800;
    font-size: 20px;
    box-shadow: var(--shadow-flat-small);
}

.project-icon-empty {
    background-color: var(--color-kaplay-purple);
    color: var(--color-border);
}

.project-icon-platformer {
    background-color: var(--color-kaplay-yellow);
    color: var(--color-border);
}

.project-delete-btn {
    background: rgba(249, 134, 103, 0.1);
    border: var(--border-width-thin) solid var(--color-border);
    color: var(--color-kaplay-peach);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-snappy);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: var(--shadow-flat-small);
}

.project-delete-btn:hover {
    background-color: var(--color-kaplay-peach);
    color: var(--color-border);
    transform: translate(-1px, -1px);
    box-shadow: 1px 1px 0px var(--color-border);
}

.project-card-body {
    margin-top: 16px;
}

.project-card-name {
    font-family: 'Fredoka', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.project-card-path {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    border-top: var(--border-width-thin) solid rgba(0, 0, 0, 0.2);
    padding-top: 12px;
}

.project-card-date {
    font-size: 11px;
    color: var(--color-text-muted);
}

.project-card-badge {
    font-size: 11px;
    font-weight: 700;
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 6px;
    padding: 2px 6px;
}

.badge-empty {
    background-color: var(--color-kaplay-purple);
    color: var(--color-border);
}

.badge-platformer {
    background-color: var(--color-kaplay-yellow);
    color: var(--color-border);
}

.empty-projects-state {
    grid-column: 1 / -1;
    background-color: var(--color-bg-card-dark);
    border: var(--border-width-thick) dashed var(--color-text-muted);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.empty-state-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.empty-state-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    max-width: 400px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(18, 21, 28, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: var(--color-bg-card-dark);
    border: var(--border-width-thick) solid var(--color-border);
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    box-shadow: var(--shadow-flat-large);
    transform: scale(0.9);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    background-color: var(--color-bg-card);
    border-bottom: var(--border-width-thick) solid var(--color-border);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-kaplay-pink);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-secondary);
    display: flex;
    justify-content: space-between;
}

.input-row {
    display: flex;
    gap: 12px;
}

.form-input {
    background-color: var(--color-bg-main);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 10px;
    padding: 12px;
    color: var(--color-text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    width: 100%;
    outline: none;
    box-shadow: inset 2px 2px 0px rgba(0,0,0,0.5);
    transition: border-color 0.15s;
}

.form-input:focus {
    border-color: var(--color-kaplay-green);
}

.form-select {
    background-color: var(--color-bg-main);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 10px;
    padding: 12px;
    color: var(--color-text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    width: 100%;
    outline: none;
    cursor: pointer;
    box-shadow: inset 2px 2px 0px rgba(0,0,0,0.5);
}

.template-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.template-card {
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition-snappy);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--color-bg-main);
    box-shadow: var(--shadow-flat-small);
}

.template-card.active {
    border-width: var(--border-width-thick);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-flat);
}

.template-card-empty.active {
    border-color: var(--color-kaplay-purple);
    background-color: rgba(163, 136, 239, 0.05);
}

.template-card-platformer.active {
    border-color: var(--color-kaplay-yellow);
    background-color: rgba(255, 222, 106, 0.05);
}

.template-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: var(--border-width-thin) solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-card-icon svg {
    width: 20px;
    height: 20px;
}

.template-card-empty .template-card-icon {
    background-color: var(--color-kaplay-purple);
    color: var(--color-border);
}

.template-card-platformer .template-card-icon {
    background-color: var(--color-kaplay-yellow);
    color: var(--color-border);
}

.template-card-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 15px;
}

.template-card-desc {
    font-size: 12px;
    color: var(--color-text-muted);
}

.modal-footer {
    border-top: var(--border-width-thick) solid var(--color-border);
    padding: 20px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: var(--color-bg-card);
}

.vdir-list {
    max-height: 200px;
    overflow-y: auto;
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 10px;
    background-color: var(--color-bg-main);
    margin-top: 10px;
}

.vdir-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.15s;
}

.vdir-item:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-kaplay-green);
}

.vdir-item svg {
    width: 18px;
    height: 18px;
}

.vdir-item-name {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
}

.vdir-item-path {
    font-size: 12px;
    color: var(--color-text-muted);
}

#workspace-editor {
    display: grid;
    grid-template-rows: 56px 1fr 28px;
    height: 100vh;
    background-color: var(--color-bg-main);
}

.we-header {
    background-color: var(--color-bg-card-dark);
    border-bottom: var(--border-width-thick) solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 10;
}

.we-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.we-brand-area {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.we-brand-area svg {
    color: var(--color-text-secondary);
}

.we-brand-area:hover svg {
    color: var(--color-kaplay-pink);
}

.we-logo-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: var(--color-kaplay-green);
    text-shadow: 
        -1px -1px 0 var(--color-border),  
         1px -1px 0 var(--color-border),
        -1px  1px 0 var(--color-border),
         1px  1px 0 var(--color-border),
         2px  2px 0 var(--color-border);
}

.we-project-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 16px;
    border-left: var(--border-width-thin) solid rgba(255,255,255,0.1);
}

.we-project-name {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--color-text-primary);
}

.we-project-badge {
    font-size: 10px;
    font-weight: 700;
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 6px;
    padding: 1px 6px;
}

.we-project-path {
    font-size: 12px;
    color: var(--color-text-muted);
}

.we-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.we-btn-icon {
    background: var(--color-bg-card);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-flat-small);
    transition: var(--transition-snappy);
}

.we-btn-icon:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-flat);
    background-color: var(--color-bg-hover);
}

.we-btn-icon:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.we-body {
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    overflow: hidden;
}

.we-sidebar-left {
    background-color: var(--color-bg-card-dark);
    border-right: var(--border-width-thick) solid var(--color-border);
    display: grid;
    grid-template-rows: 1fr 1fr;
    overflow: hidden;
}

.we-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.we-panel:not(:last-child) {
    border-bottom: var(--border-width-thick) solid var(--color-border);
}

.we-panel-header {
    background-color: var(--color-bg-card);
    border-bottom: var(--border-width-thin) solid var(--color-border);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.we-panel-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
}

.we-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.we-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    margin-bottom: 6px;
    border: 2px solid transparent;
    transition: var(--transition-snappy);
}

.we-list-item:hover {
    background-color: var(--color-bg-hover);
    border-color: var(--color-border);
}

.we-list-item.active {
    background-color: var(--color-bg-hover);
    border-color: var(--color-kaplay-green);
}

.we-list-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.we-viewport {
    background-color: #0b0d12;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.we-canvas-area {
    width: 640px;
    height: 360px;
    background-color: #1a1e27;
    border: var(--border-width-thick) solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.we-canvas-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 16px 16px;
}

.we-canvas-content {
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.we-canvas-scene-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--color-kaplay-yellow);
    text-shadow: 2px 2px 0 #000;
}

.we-canvas-game-object {
    width: 48px;
    height: 48px;
    background-color: var(--color-kaplay-pink);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-flat-small);
    animation: bounce-loop 2s infinite ease-in-out;
}

@keyframes bounce-loop {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.we-canvas-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(22, 25, 31, 0.9);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 20px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-flat-small);
}

.we-canvas-control-btn {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
}

.we-canvas-control-btn:hover {
    color: var(--color-kaplay-green);
    background-color: rgba(255,255,255,0.05);
}

.we-sidebar-right {
    background-color: var(--color-bg-card-dark);
    border-left: var(--border-width-thick) solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.we-props-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
}

.we-props-group-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.we-prop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.we-prop-label {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.we-prop-value {
    background-color: var(--color-bg-main);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 6px;
    padding: 4px 8px;
    color: var(--color-text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    width: 120px;
    outline: none;
}

.we-footer {
    background-color: var(--color-bg-card-dark);
    border-top: var(--border-width-thin) solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.notification-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--color-bg-card);
    border: var(--border-width-thick) solid var(--color-border);
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: var(--shadow-flat);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-toast.active {
    transform: translateY(0);
}

.notification-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: var(--border-width-thin) solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-toast-icon-success {
    background-color: var(--color-kaplay-green);
    color: var(--color-border);
}

.notification-toast-icon-error {
    background-color: var(--color-kaplay-peach);
    color: var(--color-border);
}

.notification-toast-icon svg {
    width: 12px;
    height: 12px;
}

.notification-toast-message {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* --- Support Donate Modal --- */
.donate-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.donate-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--color-bg-main);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: var(--color-text-primary);
    box-shadow: var(--shadow-flat-small);
    transition: var(--transition-snappy);
}
.donate-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-flat);
    background-color: var(--color-bg-hover);
    border-color: var(--color-kaplay-purple);
}
.donate-card-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg-card);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 10px;
}
.donate-card-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 2px;
}
.donate-card-desc {
    font-size: 11.5px;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* --- Navigation Tab Bar --- */
.pm-tabs-bar {
    display: flex;
    gap: 12px;
    border-bottom: var(--border-width-thick) solid var(--color-border);
    padding-bottom: 8px;
    margin-bottom: 24px;
}
.pm-tab-btn {
    font-family: 'Fredoka', sans-serif;
    font-weight: 800;
    font-size: 14px;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-snappy);
}
.pm-tab-btn:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-text-primary);
}
.pm-tab-btn.active {
    background-color: var(--color-kaplay-green);
    color: var(--color-border);
    border: var(--border-width-thin) solid var(--color-border);
    box-shadow: var(--shadow-flat-small);
}
.tab-content {
    display: block;
}
.tab-content.hidden {
    display: none !important;
}

/* --- Project List Split Details View Layout --- */
.pm-main-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    align-items: flex-start;
}
.pm-main-content {
    flex: 1;
    min-width: 0;
}
.pm-details-sidebar {
    width: 340px;
    background-color: var(--color-bg-card-dark);
    border: var(--border-width-thick) solid var(--color-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-flat);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition-snappy);
}
.pm-details-sidebar.hidden {
    display: none !important;
}
.pm-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: var(--border-width-thin) solid rgba(255,255,255,0.1);
    padding-bottom: 12px;
}
.pm-sidebar-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--color-kaplay-green);
}
.pm-sidebar-close {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 24px;
    cursor: pointer;
}
.pm-sidebar-close:hover {
    color: var(--color-kaplay-pink);
}
.pm-sidebar-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pm-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pm-detail-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}
.pm-detail-value {
    font-size: 13.5px;
    color: var(--color-text-primary);
    word-break: break-all;
}

/* --- Asset Library Styling --- */
.al-main-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.asset-library-view {
    background-color: var(--color-bg-card-dark);
    border: var(--border-width-thick) solid var(--color-border);
    border-radius: 20px;
    padding: 0;
    height: calc(100vh - 240px);
    overflow: hidden;
    box-shadow: var(--shadow-flat);
    display: flex;
    flex-direction: column;
}
.al-controls-bar {
    display: flex;
    gap: 8px;
    background-color: var(--color-bg-card);
    border-bottom: var(--border-width-thin) solid var(--color-border);
    padding: 10px 16px;
    align-items: center;
}
.al-nav-btn {
    font-family: 'Fredoka', sans-serif;
    font-weight: 800;
    font-size: 12.5px;
    background-color: var(--color-bg-main);
    border: var(--border-width-thin) solid var(--color-border);
    color: var(--color-text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-flat-small);
    transition: var(--transition-snappy);
}
.al-nav-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-flat);
    background-color: var(--color-bg-hover);
    border-color: var(--color-kaplay-green);
}
.al-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 300px;
    color: var(--color-text-secondary);
}
.spinner {
    width: 48px;
    height: 48px;
    border: var(--border-width-thick) solid rgba(255,255,255,0.1);
    border-top: var(--border-width-thick) solid var(--color-kaplay-green);
    border-radius: 50%;
    animation: al-spin 1s linear infinite;
}
@keyframes al-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.crew-search {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.crew-search input, .crew-search select {
    background-color: var(--color-bg-main);
    border: var(--border-width-thin) solid var(--color-border);
    color: var(--color-text-primary);
    padding: 12px;
    border-radius: 10px;
    outline: none;
    box-shadow: inset 2px 2px 0px rgba(0,0,0,0.5);
    width: 100%;
}
.crew-search grid, .crew-search .grid, .crew-search [class*="grid"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 20px !important;
}
.crew-search a[href*="/crew/"] {
    background-color: var(--color-bg-card);
    border: var(--border-width-thin) solid var(--color-border) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    box-shadow: var(--shadow-flat-small) !important;
    transition: var(--transition-snappy) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    text-decoration: none !important;
    color: var(--color-text-primary) !important;
}
.crew-search a[href*="/crew/"]:hover {
    transform: translate(-3px, -3px) !important;
    box-shadow: var(--shadow-flat) !important;
    background-color: var(--color-bg-hover);
    border-color: var(--color-kaplay-pink) !important;
}
.crew-search img {
    border-radius: 12px;
    border: var(--border-width-thin) solid var(--color-border);
    box-shadow: var(--shadow-flat-small);
    max-width: 100px;
    height: auto;
}

@keyframes al-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* --- Code Copy Button Styles --- */
.doc-pre {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--color-bg-card);
    border: var(--border-width-thin) solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-family: 'Fredoka', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    cursor: pointer;
    transition: var(--transition-snappy);
    box-shadow: var(--shadow-flat-small);
    z-index: 10;
    opacity: 0.7;
}

.copy-btn:hover {
    background-color: var(--color-kaplay-green);
    color: var(--color-border);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0px var(--color-border);
    opacity: 1;
}

.copy-btn:active {
    transform: translate(1px, 1px);
    box-shadow: none;
}

.copy-btn.copied {
    background-color: var(--color-kaplay-purple);
    color: var(--color-border);
    opacity: 1;
}
