:root {
    --bg-color: #ffffff;
    --container-bg: #ffffff;
    --text-color: #333;
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --secondary-text: #888;
}

/* --- LOGO V PRAVOM HORNOM ROHU --- */
.gooseweb-brand-header {
    width: auto;
    display: flex;
    justify-content: flex-end;
    padding: 0;
    background: transparent;
    position: absolute;
    top: 2px;
    right: 10px;
    z-index: 5;
    transition: all 0.3s ease;
}

.gooseweb-logo-box {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gooseweb-full-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
}

html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--bg-color);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
}

#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.loader-content {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.loader-logo {
    height: 90px;
    width: 90px;
    object-fit: cover;
    object-position: left center;
    margin-bottom: 25px;
    animation: bobbing 2s infinite ease-in-out;
}

.loading-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.load-bar-container {
    width: 250px;
    height: 14px;
    background-color: #f0f0f0;
    border-radius: 99px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #eee;
}

.load-bar-fill {
    width: 0%;
    height: 100%;
    background-color: #888; 
    border-radius: 99px;
    transition: width 0.3s ease-out;
}

@keyframes bobbing {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.tab-content {
    margin-top: -20px;
}

.container {
    background: var(--container-bg);
    padding: 25px 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    width: 400px;
    border: 1px solid #f0f0f0;
    min-height: 410px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    margin-top: 60px;
}

.content-visible {
    opacity: 1;
    transform: translateY(0px);
}

.mobile-only-logo { display: none; }
.top-header { margin-bottom: 10px; text-align: center; }
.brand-name { font-size: 2.8rem; font-weight: 900; margin: 0; color: var(--primary-color); letter-spacing: -1px; }
.main-layout { display: flex; align-items: flex-end; justify-content: center; gap: 60px; width: 100%; }
.side-maskot { height: 460px; width: auto; display: block; }
#progressContainer { width: 100%; background-color: #f0f0f0; border-radius: 5px; margin: 5px 0; height: 10px; display: none; overflow: hidden; }
#progressBar { width: 0%; height: 100%; background-color: #27ae60; transition: width 0.3s ease; }
input, button { width: 100%; padding: 12px; margin: 8px 0; border-radius: 10px; border: 1px solid #ddd; box-sizing: border-box; }
button { background-color: var(--accent-color); color: white; border: none; cursor: pointer; font-weight: bold; }
.full-ground-line { width: 100vw; height: 1px; background-color: rgba(0,0,0,0.1); position: fixed; bottom: 12vh; z-index: -1; }

@media (max-width: 768px) {
    .mobile-only-logo { display: block; height: 50px; width: auto; margin: 0 auto 10px auto; }
    .maskot-container { display: none; }
    .brand-name { font-size: 2.2rem; margin-bottom: 10px; }
    .main-layout { flex-direction: column; align-items: center; padding: 0 20px; }
    .container { width: 100%; max-width: 360px; min-height: auto; box-shadow: none; border: 1px solid #eee; margin-top: 20px; }
    .full-ground-line { display: none; }
    .gooseweb-full-logo { height: 45px; }
}

#menu-toggle {
    position: fixed; top: 20px; left: 20px; width: 50px; height: 50px;
    background: #fff; border-radius: 50%; display: flex; flex-direction: column;
    justify-content: center; align-items: center; cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 3000;
}

.bar { width: 22px; height: 2px; background: #333; margin: 2px 0; border-radius: 10px; }

#sidebar {
    position: fixed; top: 0; left: -350px; width: 300px; height: 100%;
    background: #fff; z-index: 4000; transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 30px; box-shadow: none;
}

#sidebar.active { left: 0; box-shadow: 10px 0 40px rgba(0,0,0,0.1); }
#sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.2); display: none; z-index: 3500; }
#sidebar-overlay.active { display: block; }

.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.close-btn { font-size: 30px; cursor: pointer; color: #ccc; }
.nav-item { display: block; padding: 15px; text-decoration: none; color: #333; font-weight: 700; border-radius: 10px; }

/* --- OPRAVENÉ FAREBNÉ ZVÝRAZNENIE V SIDEBARE --- */
.nav-item.active {
    color: #fff !important;
    font-weight: 800;
}

.nav-item.active[onclick*="transfer"], .nav-item.active[onclick*="Transfer"] {
    background-color: #2980b9 !important;
    box-shadow: 0 4px 10px rgba(41, 128, 185, 0.3);
}

/* Opravené na 'sketch', aby to sedelo s tvojím HTML pre InstantFrames */
.nav-item.active[onclick*="sketch"], .nav-item.active[onclick*="Sketch"] {
    background-color: #8e44ad !important;
    box-shadow: 0 4px 10px rgba(142, 68, 173, 0.3);
}

.nav-item.active[onclick*="resizer"], .nav-item.active[onclick*="Resizer"] {
    background-color: #e67e22 !important;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
}

.nav-item.active[onclick*="lasso"], .nav-item.active[onclick*="Lasso"] {
    background-color: #27ae60 !important;
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3);
}

.animate-up { animation: slideUp 0.6s ease-out forwards; }

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

.btn-green {
    background-color: #2ecc71; color: white; border: none; padding: 12px 25px;
    border-radius: 8px; font-weight: 900; cursor: pointer; transition: transform 0.2s, background 0.2s; text-transform: uppercase;
}

.btn-green:hover { background-color: #27ae60; transform: scale(1.05); }
