/* --- THE FULL OS CSS!!!!!!!!!!!!!!!!!!!!!! okthx --- */
/* --- cursorssss --- */
:root {
    --cursor-normal: url('/assets/WaddleIdle.cur') 8 8, auto;
    --cursor-hover: url('/assets/WaddleHover.cur') 10 10, pointer;
    --cursor-click: url('/assets/WaddleClick.cur') 10 10, move;
    --cursor-resize: url('/assets/WaddleResize.cur') 10 10, se-resize;
    --win-bg: #f3f3f3;
    --taskbar-bg: rgba(243, 243, 243, 0.95);
    --accent: #0067c0;
}

body, .window { cursor: var(--cursor-normal); }
button, a, .desktop-icon, .nav-btn, .news-card, .machine-card, .code-pill, .control-btn, .favorite-btn, .back-btn, .task-icon, .waddle-clicker, i, select, input, .title-bar, .hero-img, .avatar-option { 
    cursor: var(--cursor-hover); 
}
button:active, a:active, .desktop-icon:active, .nav-btn:active, .waddle-clicker:active, .hero-img:active { 
    cursor: var(--cursor-click); 
}

/* --- bunch o styles --- */
body {
    margin: 0; overflow: hidden; font-family: 'Segoe UI', sans-serif;
    background: url('/assets/waddlOSThumbnail.png') no-repeat center center fixed;
    background-size: cover; user-select: none; height: 100vh; width: 100vw;
}

.desktop-grid {
    display: flex; flex-direction: column; flex-wrap: wrap;
    height: 90vh; width: fit-content; padding: 10px; gap: 10px;
    position: relative; z-index: 50;
}

.desktop-icon {
    width: clamp(84px, 8vw, 120px); height: clamp(90px, 9vw, 130px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 4px; transition: 0.2s; text-align: center;
}
.desktop-icon:hover { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(5px); }
.desktop-icon.active { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3); }

.icon-img { width: clamp(48px, 5vw, 80px); height: clamp(48px, 5vw, 80px); margin-bottom: 5px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.icon-label { color: white; font-size: clamp(12px, 1.2vw, 16px); text-shadow: 0 1px 2px rgba(0,0,0,0.8); line-height: 1.2; }

.window {
    position: absolute; background: white; border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; overflow: hidden;
    min-width: 300px; min-height: 200px;
    animation: openWindow 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
    resize: both; overflow: hidden;
}
.window::after {
    content: ''; position: absolute; bottom: 0; right: 0;
    width: 40px; height: 40px; cursor: var(--cursor-resize); z-index: 1000;
}
.window.maximized { top: 0 !important; left: 0 !important; width: 100% !important; height: calc(100% - 48px) !important; transform: none !important; border-radius: 0; resize: none; }
.window.minimized { transform: scale(0.8) translateY(100vh); opacity: 0; pointer-events: none; }
@keyframes openWindow { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.title-bar { height: 32px; min-height: 32px; background: #f0f0f0; display: flex; justify-content: space-between; align-items: center; padding-left: 10px; user-select: none; }
.title-drag-area { flex-grow: 1; height: 100%; display: flex; align-items: center; font-size: 12px; color: #666; }
.window-controls { display: flex; height: 100%; }
.control-btn { width: 46px; height: 100%; display: flex; justify-content: center; align-items: center; transition: 0.2s; font-size: 10px; }
.control-btn:hover { background: #e0e0e0; }
.close-btn:hover { background: #c42b1c; color: white; }
.window-content { flex-grow: 1; position: relative; overflow: hidden; background: white; display: flex; flex-direction: column; }
.browser-bar { height: 40px; min-height: 40px; background: #f9f9f9; border-bottom: 1px solid #e0e0e0; display: flex; align-items: center; padding: 0 10px; gap: 10px; }
.url-input { flex-grow: 1; background: white; border: 1px solid #ddd; border-radius: 20px; padding: 4px 15px; font-size: 12px; color: #555; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }

/* cool taskbar..! */
#taskbar { 
    position: fixed; bottom: 0; left: 0; width: 100%; height: 48px; 
    background: var(--taskbar-bg); backdrop-filter: blur(20px); 
    display: flex; justify-content: center; align-items: center; 
    border-top: 1px solid rgba(255,255,255,0.2); 
    z-index: 2147483647; 
}
.taskbar-icons { display: flex; gap: 4px; height: 100%; align-items: center; }
.task-icon { width: 40px; height: 40px; border-radius: 4px; display: flex; justify-content: center; align-items: center; transition: 0.2s; position: relative; }
.task-icon:hover { background: rgba(255,255,255,0.4); }
.task-icon:active { transform: scale(0.9); }
.task-icon.open::after { content: ''; position: absolute; bottom: 0; width: 12px; height: 3px; background: #0067c0; border-radius: 2px; }
.task-icon img { width: 24px; height: 24px; }
.taskbar-right { position: absolute; right: 10px; display: flex; align-items: center; gap: 15px; font-size: 12px; }

/* --- apps!!! the most important!!! --- */
.waddle-app-container {
    width: 100%; height: 100%; position: relative; z-index: 10; 
    overflow-y: auto; overflow-x: hidden;
    --orange-main: #FF8F45; --orange-dark: #E65100; --bandana-blue: #29B6F6; --dedede-red: #FF5252;
    --text-dark: #4E342E; --glass: rgba(255, 255, 255, 0.95); --radius: 24px; --shadow-pop: 0 10px 25px -5px rgba(0,0,0,0.15);
    background: transparent; 
    font-family: 'Nunito', sans-serif; color: var(--text-dark);
    padding-bottom: 80px; scroll-behavior: smooth;
}

/* waddle dee wants yur soul....... ahhahaa oh yea and HELL beginning down below i aint docummenting ALLAT */
#soulCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; background: radial-gradient(circle at 50% 50%, #FF9E5E 0%, #E65100 100%); }

.waddle-app-container header {
    position: sticky; top: 0; width: 100%; height: 90px; background: var(--glass); backdrop-filter: blur(20px);
    border-bottom: 5px solid var(--orange-dark); display: flex; justify-content: space-between; align-items: center;
    padding: 0 3rem; z-index: 1000; box-shadow: 0 5px 30px rgba(0,0,0,0.1); box-sizing: border-box;
}

.brand-logo { height: 60px; filter: drop-shadow(0 5px 0 rgba(0,0,0,0.1)); transition: transform 0.3s; }
.brand-logo.logo-pop { animation: logoPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes logoPop { 0% { transform: scale(1); } 50% { transform: scale(1.1) rotate(5deg); } 100% { transform: scale(1); } }

.auth-btn { background: #5865F2; color: white; border: none; padding: 12px 28px; border-radius: 50px; font-family: 'Fredoka', sans-serif; font-weight: 800; display: flex; align-items: center; gap: 10px; box-shadow: 0 6px 0 #404EED; transition: transform 0.1s, box-shadow 0.1s; font-size: 1rem; }
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #404EED; }
.auth-btn:active { transform: translateY(4px); box-shadow: none; }
.google-btn { background: white; color: #444; box-shadow: 0 6px 0 #DDD; }
.google-btn:hover { box-shadow: 0 8px 0 #DDD; }

.user-badge { display: flex; align-items: center; gap: 12px; background: white; padding: 6px 20px 6px 6px; border-radius: 50px; border: 3px solid var(--orange-main); }
.user-avatar { width: 35px; height: 35px; border-radius: 50%; border: 2px solid var(--orange-dark); object-fit: cover;}

.view-container { max-width: 1400px; margin: 0 auto; padding: 20px; margin-top: 20px; display: none; opacity: 0; animation: fadeScaleUp 0.5s forwards ease-out; position: relative; z-index: 1; }
.view-container.active { display: block; opacity: 1; }
@keyframes fadeScaleUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

.hero-banner { text-align: center; margin-bottom: 40px; position: relative; }
.hero-img { max-width: 600px; width: 90%; filter: drop-shadow(0 20px 10px rgba(0,0,0,0.1)); animation: floatHero 6s ease-in-out infinite; transition: transform 0.2s; }
@keyframes floatHero { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
.hero-img.logo-pop { animation: logoPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

.grid-layout { display: grid; grid-template-columns: 2.5fr 1fr; gap: 40px; }
.news-featured { background: white; border-radius: var(--radius); overflow: hidden; position: relative; border: 6px solid white; box-shadow: var(--shadow-pop); transition: transform 0.3s; margin-bottom: 30px; }
.news-featured:hover { transform: translateY(-5px); }
.featured-img { width: 100%; height: 400px; object-fit: cover; }
.news-gallery { display: flex; gap: 5px; padding: 0 20px 20px; overflow-x: auto; }
.news-gallery img { height: 100px; width: auto; border-radius: 10px; border: 2px solid #eee; cursor: pointer; transition: transform 0.2s; }
.news-gallery img:hover { transform: scale(1.05); }

.featured-overlay { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); padding: 40px; color: white; box-sizing: border-box; }
.tag { background: var(--dedede-red); color: white; padding: 5px 15px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; }

.widget { background: white; border-radius: var(--radius); padding: 25px; margin-bottom: 30px; border: 2px solid rgba(255,255,255,0.5); box-shadow: var(--shadow-pop); }
.widget-header { font-family: 'Fredoka'; font-size: 1.4rem; color: var(--orange-dark); border-bottom: 2px dashed #EEE; padding-bottom: 15px; margin-bottom: 20px; }
.discord-embed { background: #5865F2; color: white; border-radius: 15px; padding: 20px; text-align: center; position: relative; overflow: hidden; }
.back-btn { display: inline-flex; align-items: center; gap: 10px; background: white; padding: 10px 25px; border-radius: 50px; font-weight: bold; color: var(--orange-main); margin-bottom: 30px; border: none; box-shadow: 0 5px 0 rgba(0,0,0,0.05); }
.back-btn:hover { transform: translateX(-10px); }

.article-paper { background: white; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-pop); }
.article-hero { width: 100%; height: 400px; object-fit: cover; }
.article-body { padding: 50px; line-height: 1.8; font-size: 1.1rem; color: #444; }
.article-meta { display: flex; gap: 20px; color: #888; font-size: 0.9rem; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #EEE; }

.machine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.machine-card {
    background: #fdfdfd;
    border-radius: 16px;
    padding: 15px; 
    border: 8px solid white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08); 
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative; 
    display: flex; 
    flex-direction: column; 
    overflow: visible;
    transform-style: preserve-3d;
}

.machine-card:hover { 
    transform: translateY(-10px) rotate(1deg) scale(1.02); 
    box-shadow: 0 15px 30px rgba(255, 143, 69, 0.3); 
    z-index: 10; 
    border-color: #fff;
}

.machine-card.official { 
    background: linear-gradient(180deg, #E3F2FD 0%, #FFFFFF 100%);
    border: 4px solid #90CAF9; 
}

.machine-card.featured { 
    background: linear-gradient(135deg, #FFF8E1 0%, #FFFFFF 100%);
    border: 4px solid #FFD54F;
    box-shadow: 0 15px 40px rgba(255, 193, 7, 0.4); 
}
.verified-badge, .featured-badge { position: absolute; top: -15px; padding: 5px 15px; border-radius: 10px; font-weight: bold; font-size: 0.8rem; border: 2px solid white; }
.verified-badge { right: 20px; background: var(--bandana-blue); color: white; box-shadow: 0 5px 10px rgba(41, 182, 246, 0.3); }
.featured-badge { left: 20px; background: #FFD54F; color: #5D4037; box-shadow: 0 5px 5px rgba(0,0,0,0.1); }
.machine-img { width: 100%; height: 150px; object-fit: contain; margin-bottom: 15px; background: #f9f9f9; border-radius: 10px; }
.machine-card h2, .machine-card h3 { margin: 0; font-family:'Fredoka'; font-size: 1.5rem; }
.machine-card p { font-size: 0.9rem; color: #666; margin-top: 5px; }

.code-pill { background: #37474F; color: #69F0AE; font-family: monospace; font-size: 1.2rem; padding: 12px; border-radius: 12px; text-align: center; margin-top: 15px; border: 2px dashed #546E7A; transition: 0.2s; }
.code-pill:active { background: black; transform: scale(0.98); }
.code-pill:hover { border-color: #69F0AE; }

.upload-header {
    display: flex; justify-content: space-between; align-items: center; 
    cursor: pointer; user-select: none;
    background: #f8f8f8; padding: 15px 25px; border-radius: 20px;
    margin-bottom: 20px; border: 2px solid #EEE;
    transition: 0.3s;
}
.upload-header:hover { background: #f0f0f0; border-color: var(--orange-main); }
.upload-arrow { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.upload-arrow.open { transform: rotate(180deg); }

.upload-container { background: white; padding: 40px; border-radius: 30px; text-align: center; border: 5px solid var(--orange-main); margin-bottom: 50px; box-shadow: inset 0 0 30px rgba(255, 143, 69, 0.1); display: none; }

.form-input { width: 80%; padding: 15px 25px; margin: 10px 0; border-radius: 15px; border: 2px solid #EEE; font-family: 'Nunito'; font-size: 1rem; transition: 0.3s; box-sizing: border-box; }
.form-input:focus { border-color: var(--orange-main); box-shadow: 0 0 0 4px rgba(255, 143, 69, 0.2); }
select.form-input { appearance: none; background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23333" d="M6 9L1 4h10z"/></svg>') no-repeat right 20px center; }
input[type="file"].form-input { padding: 12px; background: white; }
textarea.form-input { resize: vertical; min-height: 80px; }

.machine-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); z-index: 5000;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0; transition: opacity 0.3s;
}
.machine-modal-overlay.active { opacity: 1; }
.machine-modal-content {
    background: white; width: 90%; max-width: 800px; max-height: 90vh;
    border-radius: 20px; overflow-y: auto; position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 30px; display: flex; flex-direction: column; gap: 20px;
}
.machine-modal-overlay.active .machine-modal-content { transform: scale(1); }
.modal-img-container { 
    width: 100%; background: #111; border-radius: 15px; 
    display: flex; align-items: center; justify-content: center; 
    overflow: hidden; max-height: 500px;
}
.modal-img { max-width: 100%; max-height: 500px; object-fit: contain; }
.modal-close {
    position: absolute; top: 20px; right: 20px;
    background: rgba(0,0,0,0.1); border: none;
    width: 40px; height: 40px; border-radius: 50%;
    font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.modal-close:hover { background: #FF5252; color: white; }

#peekDee { position: absolute; bottom: 0; right: -200px; width: 180px; transition: right 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 4000; filter: drop-shadow(-5px 0 10px rgba(0,0,0,0.2)); cursor: pointer; }

.toast { 
    position: fixed; 
    top: 60px; 
    right: 20px; 
    background: white; 
    color: var(--text-dark); 
    padding: 15px 25px; 
    border-radius: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    font-family: 'Fredoka'; 
    font-weight: 600; 
    z-index: 2147483647; 
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    border-left: 5px solid var(--orange-main); 
}
@keyframes slideIn { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.banner-wrapper { position: relative; margin-bottom: 50px; text-align: center; transition: transform 0.3s; }
.banner-wrapper:hover { transform: scale(1.01); }
.wide-banner { width: 100%; height: 220px; object-fit: cover; border-radius: 30px; border: 6px solid white; box-shadow: var(--shadow-pop); }
.banner-badge { background: white; color: var(--text-dark); font-family: 'Fredoka'; font-size: 1.2rem; font-weight: bold; padding: 12px 40px; border-radius: 50px; position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border: 4px solid var(--orange-main); z-index: 10; white-space: nowrap; }

.controls-bar { background: white; border-radius: 20px; padding: 20px; margin-bottom: 30px; box-shadow: var(--shadow-pop); display: flex; gap: 15px; flex-wrap: wrap; align-items: center; }
.search-box { flex: 1; min-width: 250px; padding: 12px 20px; border-radius: 50px; border: 2px solid #EEE; font-family: 'Nunito'; font-size: 1rem; transition: 0.3s; }
.search-box:focus { border-color: var(--orange-main); box-shadow: 0 0 0 4px rgba(255, 143, 69, 0.2); }
.filter-btn { padding: 10px 20px; border-radius: 50px; border: 2px solid #EEE; background: white; font-family: 'Fredoka'; font-weight: 600; transition: all 0.3s; }
.filter-btn.active { background: var(--orange-main); color: white; border-color: var(--orange-main); }
.delete-btn { position: absolute; top: 10px; right: 10px; background: #FF5252; color: white; border: none; border-radius: 5px; width: 30px; height: 30px; cursor: pointer; opacity: 0; transition: opacity 0.2s; z-index: 10; }
.machine-card:hover .delete-btn { opacity: 1; }

.game-layout { display: flex; height: 100%; flex-direction: column; align-items: center; background: #FFF3E0; padding: 20px; font-family: 'Fredoka'; position: relative; overflow: hidden; }
.prob-container { width: 100%; max-width: 500px; text-align: center; margin-bottom: 20px; z-index: 2; }
.prob-bar-bg { width: 100%; height: 30px; background: #ddd; border-radius: 15px; overflow: hidden; border: 2px solid #bbb; position: relative; }
.prob-bar-fill { height: 100%; background: linear-gradient(90deg, #4CAF50, #8BC34A); width: 0%; transition: width 0.5s; }
.prob-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #333; font-weight: bold; font-size: 14px; width: 100%; }

.clicker-stage { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; width: 100%; }
.waddle-clicker { width: 200px; transition: transform 0.1s; user-select: none; filter: drop-shadow(0 10px 0 rgba(0,0,0,0.1)); }
.waddle-clicker:active { transform: scale(0.9); filter: drop-shadow(0 2px 0 rgba(0,0,0,0.1)); }
.waddle-clicker.cooldown { filter: grayscale(1); cursor: not-allowed; opacity: 0.7; }

#lootDisplay { margin-top: 10px; text-align: center; font-size: 1.2rem; color: #E65100; font-weight: bold; min-height: 60px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.loot-img { width: 80px; height: 50px; object-fit: contain; animation: popIn 0.3s; }
@keyframes popIn { 0% { transform: scale(0); } 80% { transform: scale(1.2); } 100% { transform: scale(1); } }

.game-stats { display: flex; gap: 20px; margin-top: 20px; background: white; padding: 10px 20px; border-radius: 50px; border: 3px solid var(--orange-main); z-index: 2; }
.shop-panel { position: absolute; right: 20px; top: 20px; width: 250px; background: white; padding: 15px; border-radius: 15px; border: 2px solid #eee; z-index: 3; box-shadow: 0 5px 20px rgba(0,0,0,0.1); display: none; }
.shop-panel.open { display: block; animation: slideIn 0.3s; }
.system-logo { width: 100px; margin: 0 auto 20px auto; display: block; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); }

.account-layout { padding: 30px; display: flex; flex-direction: column; align-items: center; gap: 20px; font-family: 'Fredoka', sans-serif; background: #FFF3E0; height:100%; }
.avatar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 20px 0; }
.avatar-option { width: 60px; height: 60px; border-radius: 50%; border: 3px solid #eee; transition: 0.2s; padding: 2px; cursor:pointer; background:white; }
.avatar-option:hover { transform: scale(1.1); }
.avatar-option.selected { border-color: var(--orange-main); background: #FFF3E0; box-shadow:0 0 0 2px var(--orange-main); }
.avatar-option img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
/* mobile suport */
@media screen and (max-width: 768px) {
    .desktop-grid {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        height: auto;
    }

    .window {
        width: 100% !important;
        height: calc(100% - 48px) !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0;
        min-width: 0;
        resize: none;
    }
    .window::after { display: none; }

    .title-drag-area { pointer-events: none; }

    #taskbar { padding: 0 10px; box-sizing: border-box; }
    .taskbar-right { display: none; }
    
    .grid-layout { grid-template-columns: 1fr; }
    .machine-grid { grid-template-columns: 1fr; }
    .waddle-app-container header { padding: 0 1rem; }
}
