/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Lewd/NSFW Color Palette */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a001a 0%, #2d0036 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    width: 100%;
}

.screen.active {
    display: block;
}

/* Loading Screen */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.loading-spinner {
    font-size: 4rem;
    color: white;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.loading-container h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.loading-container p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Content Warning Screen */
.warning-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #1a001a 0%, #2d0036 100%);
}

.warning-content {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ff1493;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 0 50px rgba(255, 20, 147, 0.3);
    backdrop-filter: blur(10px);
}

.warning-header {
    text-align: center;
    margin-bottom: 30px;
}

.warning-header h2 {
    color: #ff1493;
    font-size: 2.5rem;
    text-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
    margin-bottom: 10px;
}

.warning-body {
    margin-bottom: 30px;
}

.warning-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid #ff1493;
}

.warning-section h3 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-section p {
    color: #ffb6c1;
    line-height: 1.6;
    font-size: 1rem;
}

.warning-footer {
    text-align: center;
}

.age-confirmation {
    color: #ffd700;
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-style: italic;
}

.warning-btn {
    display: block;
    width: 100%;
    padding: 15px 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.warning-btn:not(.secondary) {
    background: linear-gradient(135deg, #ff1493 0%, #8e24aa 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 20, 147, 0.3);
}

.warning-btn:not(.secondary):hover {
    background: linear-gradient(135deg, #ff69b4 0%, #6a1b9a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 20, 147, 0.4);
}

.warning-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffb6c1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.warning-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .warning-content {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .warning-header h2 {
        font-size: 2rem;
    }
    
    .warning-section {
        padding: 15px;
    }
    
    .warning-section h3 {
        font-size: 1.1rem;
    }
    
    .warning-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* Main Menu */
.menu-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: none;
}

.game-logo {
    text-align: center;
    margin-bottom: 40px;
}

.game-logo h1 {
    color: #ff69b4;
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 12px #8e24aa, 0 0 40px #ff1493;
    animation: glow 2s ease-in-out infinite alternate;
}

.game-logo p {
    color: #ffb6c1;
    font-size: 1.2rem;
    font-style: italic;
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
    to { text-shadow: 2px 2px 20px rgba(255,255,255,0.5); }
}

.player-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    background: rgba(255, 20, 147, 0.15);
    padding: 20px 40px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    color: #ffd700;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffd700;
    font-weight: 600;
    font-size: 1.1rem;
}

.stat-item span:first-child {
    font-size: 1.3rem;
    color: #ffd700;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 300px;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 18px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ff1493 0%, #8e24aa 100%);
    color: #fff;
    box-shadow: 0 2px 16px #8e24aa44;
    transition: all 0.2s;
}
.menu-btn:hover {
    background: linear-gradient(135deg, #ff69b4 0%, #6a1b9a 100%);
    color: #fff;
    transform: scale(1.04);
    box-shadow: 0 4px 32px #ff149366;
}

.play-btn {
    background: linear-gradient(135deg, #ff1493 0%, #8e24aa 100%);
    color: white;
}
.gallery-btn {
    background: linear-gradient(135deg, #8e24aa 0%, #ff1493 100%);
    color: white;
}
.custom-btn {
    background: linear-gradient(135deg, #ffb300 0%, #ff1493 100%);
    color: #fff;
}
.settings-btn {
    background: linear-gradient(135deg, #212121 0%, #8e24aa 100%);
    color: #ffd700;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Level Selection */
.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(30, 0, 40, 0.7);
    backdrop-filter: blur(10px);
}

.level-header h2 {
    color: white;
    font-size: 2rem;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

.difficulty-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255, 20, 147, 0.2);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}
.tab-btn.active {
    background: linear-gradient(135deg, #ff1493 0%, #8e24aa 100%);
    color: #ffd700;
    transform: scale(1.05);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.level-card {
    background: rgba(40, 0, 60, 0.95);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 16px #ff149344;
    color: #fff;
}

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

.level-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.level-card.completed {
    border: 3px solid #ffd700;
}

.level-card.premium {
    border: 3px solid #ff1493;
}

.level-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #ff1493;
    margin-bottom: 15px;
}

.level-info h3 {
    color: #333;
    margin-bottom: 5px;
}

.level-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.level-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.level-status .stars {
    color: #ffd700;
}

.level-status .cost {
    color: #ff6b35;
    font-weight: 600;
}

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(30, 0, 40, 0.7);
    backdrop-filter: blur(10px);
}

.game-info {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
    background: rgba(30, 0, 40, 0.85); /* Add a dark semi-opaque background */
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    padding: 12px 32px;
    backdrop-filter: blur(6px);
}

.level-info h3, .level-info span, .game-stats, .stat {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.game-stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
}

.game-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.zoom-level {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

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

.control-btn.paused {
    background: rgba(255, 20, 147, 0.3);
    border-color: #ff1493;
    color: #ff1493;
    animation: pulse 1.5s infinite;
}

.control-btn.paused:hover {
    background: rgba(255, 20, 147, 0.4);
}

/* Pause Overlay */
#pauseOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.pause-message {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ff1493;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: white;
    box-shadow: 0 0 50px rgba(255, 20, 147, 0.3);
    animation: pulse 2s infinite;
}

.pause-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

.pause-text {
    font-size: 2rem;
    font-weight: bold;
    color: #ff1493;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
}

.pause-hint {
    font-size: 1.1rem;
    color: #ffb6c1;
    opacity: 0.8;
}

.game-content {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 100px);
}

.puzzle-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('desk.png') center center / cover no-repeat;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
}

.puzzle-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    pointer-events: none;
}

#puzzleCanvas {
    border: 3px solid #ddd;
    border-radius: 15px;
    cursor: grab;
    background: url(frame.png) center center / 100% 100% no-repeat;
    max-width: 100%;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

#puzzleCanvas:active {
    cursor: grabbing;
}

.preview-panel {
    width: 300px;
    background: url(notes.png) center center / 100% 100% no-repeat;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.preview-panel h4 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.preview-image {
    width: 100%;
    border-radius: 10px;
}

.preview-image img {
    width: 100%;
    height: 100%;
}

/* Win Screen */
.win-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.win-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.win-header {
    margin-bottom: 30px;
    color: #ffd700;
}

.win-header span:first-child {
    font-size: 4rem;
    color: #ffd700;
    margin-bottom: 15px;
}

.win-header h2 {
    color: #333;
    font-size: 2.5rem;
}

.win-stats {
    margin-bottom: 30px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
}

.stars-earned {
    color: #ffd700;
    font-size: 1.5rem;
}

.win-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.win-btn {
    background: linear-gradient(135deg, #ff1493 0%, #8e24aa 100%);
    color: #fff;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.win-btn:hover {
    background: linear-gradient(135deg, #ff69b4 0%, #6a1b9a 100%);
    color: #ffd700;
}

/* Gallery */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(30, 0, 40, 0.7);
    backdrop-filter: blur(10px);
}

.gallery-header h2 {
    color: white;
    font-size: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-info {
    padding: 15px;
}

.gallery-info h3 {
    color: #333;
    margin-bottom: 5px;
}

.gallery-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Settings */
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(30, 0, 40, 0.7);
    backdrop-filter: blur(10px);
}

.settings-header h2 {
    color: white;
    font-size: 2rem;
}

.settings-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.setting-group {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.setting-group h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    color: #333;
    font-weight: 500;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.setting-item select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
}

.settings-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: rgba(30,0,40,0.97) !important;
    color: #fff;
    box-shadow: 0 8px 40px #000a;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #FFF;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.puzzle-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
}

.puzzle-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.purchase-info h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.purchase-info p {
    color: #666;
    margin-bottom: 15px;
}

.cost {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ff6b35;
    font-weight: 600;
    font-size: 1.2rem;
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

.purchase-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* Preview Confirmation Modal Styles */
.preview-confirm-info {
    text-align: center;
    padding: 20px 0;
}

.preview-cost-display {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.preview-cost-display span:first-child {
    font-size: 2.5rem;
}

.gold-balance {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.gold-balance p {
    margin: 5px 0;
    font-size: 1.1rem;
    color: #FFF;
}

.preview-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-warning span:first-child {
    color: #ffc107;
    font-size: 1.5rem;
}

.preview-warning p {
    margin: 0;
    color: #856404;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-logo h1 {
        font-size: 2.5rem;
    }
    
    .player-stats {
        flex-direction: column;
        gap: 15px;
        padding: 15px 25px;
    }
    
    .menu-buttons {
        max-width: 250px;
    }
    
    .menu-btn {
        padding: 15px 25px;
        font-size: 1rem;
    }
    
    .difficulty-tabs {
        gap: 5px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .levels-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-content {
        flex-direction: column;
        height: auto;
    }
    
    .preview-panel {
        width: 100%;
        order: -1;
    }
    
    .win-buttons {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .game-logo h1 {
        font-size: 2rem;
    }
    
    .level-header h2,
    .gallery-header h2,
    .settings-header h2 {
        font-size: 1.5rem;
    }
    
    .levels-grid {
        grid-template-columns: 1fr;
    }
    
    .win-content {
        padding: 20px;
    }
    
    .win-header h2 {
        font-size: 2rem;
    }
} 

/* Gallery overlay for uncompleted levels */
.gallery-item .gallery-image.uncompleted {
    filter: blur(8px) grayscale(0.7) brightness(1.2);
    opacity: 0.7;
    background: #1a001a;
}
.gallery-item .gallery-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    background: rgba(80,80,120,0.5);
    border-radius: 15px;
    z-index: 1;
    pointer-events: none;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Modal for full image view */
#galleryImageModal.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
#galleryImageModal.modal.active {
    display: flex;
}
#galleryImageModal .modal-content {
    background: none;
    box-shadow: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
#galleryImageModal img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    background: white;
}
#galleryImageModal .close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 2;
    background: rgba(0,0,0,0.5);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Level Creation */
.custom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.custom-header h2 {
    color: white;
    font-size: 2rem;
}

.custom-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.custom-form {
    background: rgba(40, 0, 60, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: #fff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #ffd700;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ff1493;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #1a001a;
    color: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #ffd700;
}

.form-group input[type="file"] {
    padding: 8px;
    border: 2px dashed #ddd;
    background: #f8f9fa;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.custom-preview {
    margin: 30px 0;
    text-align: center;
}

.custom-preview h3 {
    color: #ff69b4;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.preview-container {
    display: inline-block;
    border: 3px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 15px;
}

#customPreviewCanvas {
    border-radius: 5px;
    background: white;
}

#customPreviewInfo {
    color: #666;
    font-style: italic;
    margin: 0;
}

.custom-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.custom-buttons .custom-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff1493 0%, #8e24aa 100%);
    color: #fff;
}
.custom-buttons .custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.custom-buttons .custom-btn.secondary {
    background: linear-gradient(135deg, #6a1b9a 0%, #212121 100%);
    color: #ffd700;
}

/* Responsive design for custom level creation */
@media (max-width: 768px) {
    .custom-content {
        padding: 15px;
    }
    
    .custom-form {
        padding: 20px;
    }
    
    .custom-buttons {
        flex-direction: column;
    }
    
    .custom-buttons .custom-btn {
        width: 100%;
        justify-content: center;
    }
} 

.win-content, .win-header, .win-header h2 {
    color: #1a001a !important;
}

.win-stats, .stat-row {
    color: #1a001a !important;
}

.stat-row span:last-child {
    color: #ffd700 !important;
    font-weight: bold;
}

.stars-earned span {
    color: #ffd700 !important;
    font-size: 1.7rem;
}

.win-btn {
    background: linear-gradient(135deg, #ff1493 0%, #8e24aa 100%);
    color: #fff;
}

.win-btn:hover {
    background: linear-gradient(135deg, #ff69b4 0%, #6a1b9a 100%);
    color: #ffd700;
} 

/* THEME: DEFAULT (Lewd/Pink) */
body.theme-default {
    background: linear-gradient(135deg, #1a001a 0%, #2d0036 100%) !important;
    color: #fff !important;
}
body.theme-default .menu-btn,
body.theme-default .win-btn,
body.theme-default .custom-btn {
    background: linear-gradient(135deg, #ff1493 0%, #8e24aa 100%) !important;
    color: #fff !important;
}
body.theme-default .level-card,
body.theme-default .custom-form {
    background: rgba(40, 0, 60, 0.95) !important;
    color: #fff !important;
}
body.theme-default .modal-content {
    background: rgba(30,0,40,0.97) !important;
    color: #fff !important;
}

/* THEME: DARK */
body.theme-dark {
    background: #0a0010 !important;
    color: #fff !important;
}
body.theme-dark .menu-btn,
body.theme-dark .win-btn,
body.theme-dark .custom-btn {
    background: linear-gradient(135deg, #222 0%, #6a1b9a 100%) !important;
    color: #fff !important;
}
body.theme-dark .level-card,
body.theme-dark .custom-form {
    background: #181018 !important;
    color: #fff !important;
}
body.theme-dark .modal-content {
    background: #181018 !important;
    color: #fff !important;
}
body.theme-dark .stat-row span:last-child,
body.theme-dark .stars-earned span {
    color: #ffd700 !important;
}

/* THEME: LIGHT */
body.theme-light {
    background: #fff !important;
    color: #1a001a !important;
}
body.theme-light .menu-btn,
body.theme-light .win-btn,
body.theme-light .custom-btn {
    background: linear-gradient(135deg, #ffb6c1 0%, #ba68c8 100%) !important;
    color: #1a001a !important;
}
body.theme-light .level-card,
body.theme-light .custom-form {
    background: #f8f6fa !important;
    color: #1a001a !important;
}
body.theme-light .modal-content {
    background: #f8f6fa !important;
    color: #1a001a !important;
}
body.theme-light .stat-row span:last-child,
body.theme-light .stars-earned span {
    color: #ff69b4 !important;
}

body, .screen, .menu-container, .level-card, .win-content, .custom-form, .modal-content {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}
img {
    -webkit-user-drag: none;
    user-drag: none;
} 

.support-patreon {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}
.patreon-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #ff424d 0%, #ffb86c 100%);
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 2px 12px #ff424d33;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.patreon-btn:hover {
    background: linear-gradient(90deg, #ffb86c 0%, #ff424d 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 24px #ff424d55;
} 

.main-logo-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff 60%, #ff69b4 100%);
    border: 4px solid #8e24aa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px auto;
    box-shadow: 0 4px 24px #8e24aa33;
    overflow: hidden;
}
.main-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 8px #0002;
} 

.main-logo-link {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.15s;
}
.main-logo-link:hover {
    transform: scale(1.06) rotate(-3deg);
}
.header-logo-link {
    display: inline-block;
    margin-right: 18px;
    vertical-align: middle;
}
.header-logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff 60%, #ff69b4 100%);
    border: 2.5px solid #8e24aa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px #8e24aa22;
    overflow: hidden;
}
.header-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
} 

.sound-credits-list {
    margin: 12px 0 0 0;
    padding: 0 0 0 18px;
    font-size: 1rem;
    color: #444;
}
.sound-credits-list li {
    margin-bottom: 6px;
    word-break: break-all;
}
.sound-credits-list a {
    color: #8e24aa;
    text-decoration: underline;
    transition: color 0.2s;
}
.sound-credits-list a:hover {
    color: #ff69b4;
} 

/* Import Modal Styles */
.import-summary {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.import-summary h4 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item span:first-child {
    color: #ffb6c1;
    font-weight: 500;
}

.summary-item span:last-child {
    color: #ffd700;
    font-weight: bold;
}

.import-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.import-warning span:first-child {
    color: #ffc107;
    font-size: 1.2rem;
    margin-top: 2px;
}

.import-warning p {
    color: #ffd700;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
} 

.game-instructions {
    margin-top: 10px;
    text-align: center;
    padding: 10px 0 0 0;
}
.puzzle-frame-header {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff1493;
    text-shadow: 0 2px 8px #fff2, 0 0 8px #ff149355;
    margin-bottom: 2px;
}
.move-instructions {
    font-size: 1rem;
    color: #fff;
    opacity: 0.85;
    text-shadow: 0 1px 4px #0008;
} 