 * {
  margin: 0;
  padding: 0;
   box-sizing: border-box;
    }
 html {
 overflow-y: scroll;
   }

       :root {
  /* Основні кольори */
  --black: #131010;
  --gray: #B2AFAF;
  --darkgray: #555;
  --white: #FDF7F7;
  --bg: #FDF7F7;

  /* Брендові кольори */
  --pink: #FF4E99;
  --orange: #FF9F00;
  --lime: #C6DF2B;
  --blue: #009DFF;

  /* Для тестів */
   --red: #d50000; 
   --green: #00c853;
   --light-red: #ffe6e6;
   --light-green: #e6ffeb;

  /* Шрифт */
  --font-family: 'Rubik', sans-serif;
}
.color-pink{
  color: var(--pink);
}
.color-orange{
  color: var(--orange);
}
.color-lime{
  color: var(--lime);
}
.color-blue{
  color: var(--blue);
}

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

.main-container {
    display: flex;
    height: calc(100vh - 140px);
    width: 100%;
    position: fixed;
    top: 140px;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Ліва колонка - прокручувана */
.column-left {
    flex: 1;
    min-width: 200px;
    background: var(--white);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px;
    border-right: 2px solid #e0e0e0;
    position: relative;
    height: 100%;
}

        .column-left::-webkit-scrollbar {
            width: 8px;
        }

        .column-left::-webkit-scrollbar-track {
            background: #f1f1f1;
        }

        .column-left::-webkit-scrollbar-thumb {
            background: var(--darkgray);
            border-radius: 4px;
        }

        .column-left::-webkit-scrollbar-thumb:hover {
            background: var(--gray);
        }

        /* Центральна колонка - редактор */
        .column-center {
            flex: 1;
            min-width: 200px;
            background: var(--black);
            display: flex;
            flex-direction: column;
            border-right: 2px solid #e0e0e0;
            position: relative;
        }

        /* Права колонка - превʼю */
        .column-right {
            flex: 1;
            min-width: 200px;
            background: var(--white);
            display: flex;
            flex-direction: column;
            position: relative;
        }

        /* Роздільники для resize */
        .resizer {
            width: 5px;
            cursor: col-resize;
            background: transparent;
            position: absolute;
            top: 0;
            bottom: 0;
            right: -2.5px;
            z-index: 10;
            transition: background 0.2s;
        }

        .resizer:hover {
            background: var(--lime);
        }

        .resizer.resizing {
            background: var(--lime);
        }

        h1 {
            font-size: 36px;
            font-weight: 700;
            margin-bottom: 20px;
            color: var(--black);
        }

        h2 {
            font-size: 20px;
            font-weight: 600;
            margin-top: 20px;
            margin-bottom: 12px;
            color: #2c2c2c;
        }

        p {
            font-size: 15px;
            line-height: 1.7;
            margin-bottom: 12px;
            color: #444;
        }

        .code-example {
            background: #f8f8f8;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 15px;
            margin: 15px 0;
            font-size: 14px;
            color: var(--darkgray);
        }

        .tag {
            color: var(--pink);
            font-weight: 500;
        }

        .color-dot {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 5px;
        }

        .orange { background: var(--orange); }
        .black { background: var(--blue); }
        .green { background: var(--lime); }

        /* Редактор коду */
        .editor-header {
            background: #2d2d2d;
            padding: 10px 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .file-tab {
            background: var(--black);
            padding: 8px 16px;
            border-radius: 6px 6px 0 0;
            color: var(--white);
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 8px;
        }


        .editor-wrapper {
            flex: 1;
            display: flex;
            background: var(--black);
            overflow: hidden;
        }

        .line-numbers {
            background: #252526;
            color: var(--lime);
            padding: 15px 10px;
            text-align: right;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            line-height: 1.6;
            user-select: none;
            min-width: 45px;
            overflow: hidden;
            white-space: pre;
        }

        .code-editor {
            flex: 1;
            background: var(--black);
            color: var(--pink);
            border: none;
            padding: 15px;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            line-height: 1.6;
            resize: none;
            outline: none;
        }

        .editor-footer {
            background: #2d2d2d;
            padding: 15px;
            display: flex;
            gap: 10px;
            justify-content: flex-start;
        }

        .btn {
            padding: 12px 60px;
            border: 3px solid var(--black);
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 6px 6px 0px var(--black);
        }

        .btn:hover {
            box-shadow: 8px 8px 0px var(--black);
            transform: translate(-2px, -2px);
        }

        .btn:active {
            box-shadow: 3px 3px 0px var(--black);
            transform: translate(3px, 3px);
        }

        .btn-run {
            background-color: var(--lime);
            font-family: var(--font-family);
            border-radius: 20px;
            border: 3px solid var(--black);
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 6px 6px 0px var(--black);
        }

        .btn-run:hover {
            background: var(--pink);
            box-shadow: 8px 8px 0px var(--black);
            transform: translate(-2px, -2px);
        }

        .btn-run:active {
            box-shadow: 3px 3px 0px var(--black);
            transform: translate(3px, 3px);
        }

        .btn-ready {
            background: var(--pink);
            color: var(--black);
            font-family: var(--font-family);
            border-radius: 20px;
            border: 3px solid var(--black);
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 6px 6px 0px var(--black);
        }

        .btn-ready:hover {
            background: var(--lime);
            box-shadow: 8px 8px 0px var(--black);
            transform: translate(-2px, -2px);
        }

        .btn-ready:active {
            box-shadow: 3px 3px 0px var(--black);
            transform: translate(3px, 3px);
        }

        /* Превʼю */
        .preview-header {
            padding: 12px 20px;
            display: flex;
            align-items: center;
        }

        .url-bar {
    background: var(--orange);
    padding: 12px 56px;
    border-radius: 20px;
    text-align: center;
    color: var(--black);
    font-size: 16px;
    font-weight: 500;
    width: 500px;
    margin: 0 auto; 
}

        .preview-content {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px;
            overflow: auto;
        }

        .preview-placeholder {
            text-align: center;
            color: var(--gray);
        }

        .icon {
            font-size: 64px;
            margin-bottom: 20px;
        }

        iframe {
            width: 100%;
            height: 100%;
            border: none;
            background: var(--white);
        }

        .instruction-block {
            background: #fff3cd;
            border: 1px solid #ffd97d;
            border-radius: 8px;
            padding: 15px;
            margin: 15px 0;
            font-family: 'Courier New', monospace;
            font-size: 14px;
        }

        .task-block {
            background: var(--light-green);
            border: 1px solid #a5d6a7;
            border-radius: 8px;
            padding: 20px;
            margin: 20px 0;
        }

        .task-block h4 {
            color: var(--black);
            margin-bottom: 15px;
            font-family: 900;
            font-size: 24px;
        }

        .help-section {
            margin-top: 40px;
            padding-top: 20px;
            border-top: 2px solid #e0e0e0;
        }

        .help-section h3 {
    background: var(--orange);
    color: black;
    font-weight: 800;
    text-align: center;
    padding: 26px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 20px;
}

     .help-item {
    padding: 29px;
    margin: 5px 0;
    text-align: center;
    background: var(--pink);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    font-weight: 500;
}

        .help-item:hover {
            background: #e0e0e0;
        }

        .ai-koodi {
            background: var(--pink);
            color: white;
            padding: 12px;
            border-radius: 6px;
            text-align: center;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            margin-top: 5px;
        }

        .ai-koodi:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px var(--pink);
        }

        /* Модальні вікна */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            animation: fadeIn 0.3s;
        }

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

        .modal {
            background: var(--white);
            border-radius: 12px;
            padding: 30px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            animation: slideUp 0.3s;
        }

        .modal h3 {
            font-size: 28px;
            font-weight: 800;
            margin-bottom: 20px;
            color: var(--black);
        }

        .modal p {
            font-size: 18px;
            line-height: 1.7;
            color: var(--black);
            margin-bottom: 15px;
        }

        .modal-close {
            padding: 10px 44px;
            font-size: 18px;
            background: var(--pink);
            font-weight: 600;
            color: var(--black);
            font-family: var(--font-family);
            border-radius: 20px;
            border: 3px solid var(--black);
            cursor: pointer;
            transition: all 0.2s ease;
            margin-top: 20px;
            float: right;
            box-shadow: 6px 6px 0px var(--black);
        }

        .modal-close:hover {
            background: var(--lime);
            box-shadow: 8px 8px 0px var(--black);
            transform: translate(-2px, -2px);
        }

        .modal-close:active {
            box-shadow: 3px 3px 0px var(--black);
            transform: translate(3px, 3px);
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

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

.code-example {
    position: relative; 
}

.copy-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--black);
    color: var(--white);
    border: none;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s, background-color 0.2s;
    z-index: 10;
}

.copy-button:hover {
    opacity: 1;
    background-color: var(--pink);
}

.file-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.header-container {
  max-width: 1500px; 
  margin: 0 auto; 
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---------------------------------------
 НАВІГАЦІЯ (Фіксація та приховування)
------------------------------------------ */
.header-main {
  position: fixed; 
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  z-index: 1000;
  transition: all 0.4s ease-in-out; 
  padding: 5px 0; 
}

.header-main.header-hidden {
  transform: translateY(-100%);
}

.header-logo img {
  height: 130px; 
  display: block;
}

.main-menu {
  display: flex;
  gap: 60px; 
  margin: 0 auto;
}

.menu-link {
  color: var(--black);
  text-decoration: none;
  font-weight: 700; 
  font-size: 22px; 
  transition: color 0.3s ease, transform 0.3s ease;
}

.menu-link:nth-child(1):hover { color: var(--pink); transform: scale(1.1); }
.menu-link:nth-child(2):hover { color: var(--orange); transform: scale(1.1); }
.menu-link:nth-child(3):hover { color: var(--lime); transform: scale(1.1); }
.menu-link:nth-child(4):hover { color: var(--blue); transform: scale(1.1); }
.menu-link:nth-child(5):hover { color: var(--pink); transform: scale(1.1); }

/* ---------------------------------------
 /* 1. BUTTONS */
.primary-button {
  background-color: var(--lime);
  color: var(--black);
  font-family: var(--font-family);
  padding: 20px 45px;
  box-shadow: 4px 4px 0 #1a1a2e;
  font-size: 22px;
  border: 2px solid var(--black);
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.primary-button:hover {
  opacity: 0.9;
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
/* бургер-меню */
.burger-menu {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
}

.burger-bar {
  height: 5px;
  background-color: var(--black);
  border-radius: 10px;
}

/* Мобільна навігація */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.mobile-menu a {
  color: var(--black); 
  text-decoration: none;
  font-size: 24px;
  margin: 20px 0;
}

.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  font-weight: bold;
  color: var(--black);
  cursor: pointer;
  z-index: 1002;
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 30px;
  }

  .header-logo {
    order: 1;
    flex: 1;
  }

  .header-logo img {
    height: 60px;
  }

  .streak-container {
    order: 2;
    margin-right: 20px;
  }

  .burger-menu {
    display: flex;
    order: 3;
  }

  .main-menu {
    display: none;
  }

  .cta-button {
    display: none;
  }
}

.mobile-menu.open {
  display: flex;
}

/* Для великих екранів */
@media (min-width: 769px) {
  .burger-menu {
    display: none;
  }

  .mobile-menu {
    display: none;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 20px;
  }

  .header-logo img {
    height: 50px;
  }
}

.login-icon {
  margin-left: 24px; 
  font-size: 3rem;
  color: var(--black); /
}

@media (max-width: 768px) {
  .login-icon {
    display: none;
  }
}

/* Кнопки різних кольорів */
.btn-green {
  background-color: var(--lime);
  color: var(--black);
}

.btn-org {
  background-color: var(--orange);
  color: var(--black);
}

.btn-pink {
  background-color: var(--pink);
  color: var(--black);
}

.btn-blue {
  background-color: var(--blue);
  color: var(--black);
}

.btn-nav {
  background-color: var(--lime);
  color: var(--black);
  border-radius: 30px;
  padding: 12px 25px;
}
.primary-button-mini {
  background-color: var(--lime);
  color: var(--black);
  font-family: var(--font-family);
  padding: 15px 25px;
  font-size: 15px;
  border: 2px solid var(--black);
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.primary-button-mini:hover {
    background-color: var(--pink);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================
   СТИЛІ ДЛЯ МОДАЛОК ПОМИЛОК ТА ДОПОМОГИ
   Додай цей код в кінець твого editor.css файлу
============================================ */

/* Модалка помилки */
.modal-error {
    border-top: 4px solid #ff6b6b;
    animation: shakeModal 0.5s ease-in-out;
}

.modal-error h3 {
    color: #ff6b6b;
}

.error-content {
    background: #fff5f5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
    margin: 15px 0;
    line-height: 2;
    font-size: 15px;
}

.error-content strong {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
}

.error-content code {
    background: #ffe0e0;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #c92a2a;
    font-weight: 600;
}

.attempt-counter {
    text-align: center;
    font-size: 16px;
    padding: 12px;
    background: #fff5f5;
    border-radius: 8px;
    margin: 15px 0;
    border: 2px solid #ffc9c9;
}

/* Модалка допомоги */
.modal-help {
    border-top: 4px solid #ffa94d;
    animation: bounceIn 0.6s ease-out;
}

.modal-help h3 {
    color: #e67700;
}

.modal-help > div {
    animation: fadeIn 0.8s ease-in;
}

/* Анімація тремтіння для модалки помилки */
@keyframes shakeModal {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* Анімація появи для модалки допомоги */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-100px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Покращена анімація fadeIn */
@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стилізація списку помилок */
.error-content p {
    margin: 8px 0;
    padding-left: 5px;
}

/* Виділення синтаксичних помилок */
.error-content strong[style*="color: #d50000"] {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Покращені кнопки в модалках */
.primary-button-mini {
    background: linear-gradient(135deg, var(--lime) 0%, #a8c716 100%);
    color: var(--black);
    border: 2px solid var(--black);
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.3px;
    font-family: var(--font-family);
}

.primary-button-mini:hover {
    background: linear-gradient(135deg, var(--pink) 0%, #ff3380 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 78, 153, 0.4);
}

.primary-button-mini:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 78, 153, 0.3);
}

/* Стилізація overlay для кращого затемнення */
.modal-overlay.active {
    backdrop-filter: blur(3px);
    animation: fadeInOverlay 0.3s ease-in;
}

@keyframes fadeInOverlay {
    from {
        background: rgba(0, 0, 0, 0);
    }
    to {
        background: rgba(0, 0, 0, 0.5);
    }
}

@media (max-width: 768px) {
    .modal {
        max-width: 95%;
        padding: 20px;
    }
    
    .error-content {
        font-size: 14px;
        padding: 15px;
    }
    
    .modal h3 {
        font-size: 22px;
    }
    
    .primary-button-mini {
        width: 100%;
        padding: 12px 20px;
    }
}

.modal-overlay#completionModal.active .modal {
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.error-content::before {
    content: "⚠️";
    font-size: 24px;
    display: block;
    margin-bottom: 10px;
}


.column-left ol {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
    margin-bottom: 20px;
    counter-reset: list-item; 
}

.column-left ol li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px;
    font-size: 1.05em;
    line-height: 1.6;
    color: #444; 
    font-weight: 500;
}

.column-left ol li code {
    color: var(--orange); 
    background-color: #fcebe2;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: bold;
}

.column-left ol li::before {
    counter-increment: list-item;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 900; 
    font-size: 1.1em;
    width: 25px;
    text-align: right;
}

.mobile-tabs {
    display: none;
    position: fixed;
    top: 140px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 3px solid var(--black);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-tabs-container {
    display: flex;
    justify-content: space-around;
    padding: 0;
}

.mobile-tab {
    flex: 1;
    padding: 16px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--darkgray);
    background: var(--white);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 4px solid transparent;
}

.mobile-tab.active {
    color: var(--black);
    background: linear-gradient(to bottom, #fff, #f8f8f8);
}

.mobile-tab:nth-child(1).active {
    border-bottom-color: var(--pink);
}

.mobile-tab:nth-child(2).active {
    border-bottom-color: var(--orange);
}

.mobile-tab:nth-child(3).active {
    border-bottom-color: var(--lime);
}

.mobile-tab i {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-tabs {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 3px solid var(--black);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-tabs-container {
    display: flex;
    justify-content: space-around;
    padding: 0;
}

.mobile-tab {
    flex: 1;
    padding: 7px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--darkgray);
    background: var(--white);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 4px solid transparent;
}

.mobile-tab.active {
    color: var(--black);
    background: linear-gradient(to bottom, #fff, #f8f8f8);
}

.mobile-tab:nth-child(1).active {
    border-bottom-color: var(--pink);
}

.mobile-tab:nth-child(2).active {
    border-bottom-color: var(--orange);
}

.mobile-tab:nth-child(3).active {
    border-bottom-color: var(--lime);
}

.mobile-tab i {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

/* Адаптація для планшетів */
@media (max-width: 1024px) {
    .header-main {
        padding: 5px 0;
    }
    
    .main-container {
        top: 100px;
        height: calc(100vh - 100px);
    }
    
    .column-left,
    .column-center,
    .column-right {
        min-width: 250px;
    }
}

/* Адаптація для мобільних */
@media (max-width: 768px) {
    .mobile-tabs {
        display: block;
        top: 75px; 
    }
    
    .header-main {
        padding: 3px 0;
    }
    
    .header-logo img {
        height: 70px;
    }
    
    .main-container {
        top: 0;
        height: 100vh;
        flex-direction: column;
        padding-top: 125px; 
    }
    

    .column-left,
    .column-center,
    .column-right {
        position: absolute;
        top: 125px; 
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        min-width: 100%;
        flex: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1;
        border-right: none;
    }
    

    .column-left.active,
    .column-center.active,
    .column-right.active {
        opacity: 1;
        visibility: visible;
        z-index: 10;
    }
    

    .resizer {
        display: none !important;
    }
    

    .column-left {
        padding: 20px 15px;
        padding-bottom: 80px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .column-left h1 {
        font-size: 26px;
        margin-bottom: 15px;
    }
    
    .column-left h2 {
        font-size: 18px;
        margin-top: 20px;
    }
    
    .column-left p {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .code-example {
        padding: 12px;
        font-size: 13px;
        margin: 12px 0;
        overflow-x: auto;
    }
    
    .instruction-block,
    .task-block {
        padding: 15px;
        font-size: 14px;
    }
    
    .task-block h4 {
        font-size: 20px;
    }
    
    /* Редактор */
    .column-center {
        display: flex;
        flex-direction: column;
        background: var(--black);
    }
    
    .editor-header {
        padding: 8px 12px;
        background: #1e1e1e;
    }
    
    .file-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .file-icon {
        width: 14px;
        height: 14px;
    }
    
    .editor-wrapper {
        flex: 1;
        display: flex;
        overflow: hidden;
    }
    
    .line-numbers {
        min-width: 40px;
        padding: 10px 5px;
        font-size: 13px;
    }
    
    .code-editor {
        padding: 10px;
        font-size: 13px;
        line-height: 1.5;
    }
    
    .editor-footer {
        padding: 12px;
        gap: 8px;
        flex-wrap: wrap;
        background: #1e1e1e;
        border-top: 2px solid #2d2d2d;
    }
    
    .btn {
        flex: 1;
        min-width: calc(50% - 4px);
        padding: 12px 20px;
        font-size: 15px;
        font-weight: 700;
        border-radius: 12px;
    }
    
    .btn span:first-child {
        margin-right: 5px;
    }
    
    /* Preview */
    .column-right {
        background: var(--white);
    }
    
    .preview-header {
        padding: 10px 15px;
        background: var(--white);
        border-bottom: 2px solid #e0e0e0;
    }
    
    .url-bar {
        padding: 10px 20px;
        font-size: 14px;
        width: auto;
        max-width: 100%;
    }
    
    .preview-content {
        height: calc(100vh - 125px);
        overflow: auto;
    }
    
    .preview-placeholder {
        padding: 20px;
    }
    
    .preview-placeholder .icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .preview-placeholder p {
        font-size: 14px;
        color: var(--darkgray);
    }
    
    iframe {
        width: 100%;
        height: 100%;
        border-radius: 8px;
    }
    
    /* Розділ допомоги */
    .help-section {
        margin-top: 30px;
        padding-top: 15px;
    }
    
    .help-section h3 {
        padding: 20px;
        font-size: 18px;
    }
    
    .help-item {
        padding: 18px;
        font-size: 15px;
    }
    
    .ai-koodi {
        padding: 15px;
        font-size: 15px;
    }
    
    /* Модальні вікна */
    .modal {
        max-width: 95%;
        width: 95%;
        padding: 25px 20px;
        max-height: 85vh;
        border-radius: 16px;
    }
    
    .modal h3 {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .modal p {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .modal-close,
    .primary-button-mini {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        margin-top: 15px;
    }
    
    .error-content {
        padding: 15px;
        font-size: 14px;
    }
    
    .error-content code {
        font-size: 12px;
        padding: 2px 6px;
    }
    
    .attempt-counter {
        font-size: 15px;
        padding: 10px;
    }
    
    .column-left,
    .column-center,
    .column-right {
        animation: fadeInTab 0.3s ease;
    }
    
    @keyframes fadeInTab {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-tab:active {
        transform: scale(0.95);
        background: var(--bg);
    }
    
    .column-left::-webkit-scrollbar,
    .preview-content::-webkit-scrollbar {
        width: 6px;
    }
    
    .column-left::-webkit-scrollbar-track,
    .preview-content::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .column-left::-webkit-scrollbar-thumb,
    .preview-content::-webkit-scrollbar-thumb {
        background: var(--gray);
        border-radius: 3px;
    }
}

/* Дуже маленькі екрани */
@media (max-width: 400px) {
    .mobile-tabs {
        top: 60px; 
    }

    .main-container {
        padding-top: 115px; 
    }
    
    .column-left,
    .column-center,
    .column-right {
        top: 115px; 
    }
    
    .mobile-tab {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .mobile-tab i {
        font-size: 18px;
    }
    
    .column-left h1 {
        font-size: 22px;
    }
    
    .column-left h2 {
        font-size: 16px;
    }
    
    .column-left p {
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .code-editor {
        font-size: 12px;
    }
    
    .line-numbers {
        font-size: 12px;
        min-width: 35px;
    }
}

/* ============================================
   СТИЛІ ДЛЯ СПОВІЩЕНЬ ПРО ПОІНТИ ТА STREAK В УРОКАХ
============================================ */

/* KD Notification (для +/- KD) */
.kd-notification {
    position: fixed;
    top: 20px;
    right: -400px;
    padding: 16px 24px;
    border-radius: 12px;
    z-index: 10001;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 250px;
    border: 3px solid var(--black);
    font-family: var(--font-family, 'Rubik', sans-serif);
}

.kd-notification.show {
    right: 20px;
}

.kd-notification.positive {
    background: linear-gradient(135deg, #C6DF2B 0%, #a7c024 100%);
    color: var(--black);
    box-shadow: 0 8px 25px rgba(198, 223, 43, 0.5);
}

.kd-notification.negative {
    background: linear-gradient(135deg, #FF4E99 0%, #e63d7a 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 78, 153, 0.5);
}

.kd-notification-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kd-notification .kd-amount {
    font-size: 1.5em;
    font-weight: 800;
}

.kd-notification .kd-reason {
    font-size: 0.9em;
    opacity: 0.9;
}

.kd-notification .kd-premium-hint {
    font-size: 0.75em;
    opacity: 0.7;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .kd-notification {
        right: -100%;
        min-width: 200px;
        padding: 12px 18px;
        top: 10px;
    }

    .kd-notification.show {
        right: 10px;
    }

    .kd-notification .kd-amount {
        font-size: 1.3em;
    }
}

/* Сповіщення про нараховані поінти */
.points-earned-notification {
    position: fixed;
    top: 20px;
    right: -400px;
    background: linear-gradient(135deg, #C6DF2B 0%, #a7c024 100%);
    color: var(--black);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(198, 223, 43, 0.4);
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
    border: 3px solid var(--black);
}

.points-earned-notification.show {
    right: 20px;
}

.points-earned-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.points-icon {
    font-size: 3em;
    animation: star-bounce 0.6s ease infinite alternate;
}

@keyframes star-bounce {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.2) rotate(15deg); }
}

.points-text {
    flex-grow: 1;
}

.points-amount {
    font-size: 2em;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.points-message {
    font-size: 1em;
    font-weight: 600;
    opacity: 0.9;
}

/* Сповіщення про Streak в уроці */
.streak-notification-lesson {
    position: fixed;
    top: 100px;
    right: -400px;
    background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.5);
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
    border: 3px solid var(--black);
}

.streak-notification-lesson.show {
    right: 20px;
}

.streak-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.streak-icon {
    font-size: 3em;
    animation: fire-flicker 1s ease-in-out infinite;
}

@keyframes fire-flicker {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.streak-text {
    flex-grow: 1;
}

.streak-amount {
    font-size: 1.8em;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.streak-message {
    font-size: 0.95em;
    font-weight: 600;
    opacity: 0.95;
}

/* Level Up сповіщення в уроці */
.level-up-notification-lesson {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #FF4E99 0%, #ff3380 100%);
    color: white;
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255, 78, 153, 0.6);
    z-index: 10001;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 4px solid var(--black);
}

.level-up-notification-lesson.show {
    transform: translate(-50%, -50%) scale(1);
    animation: pulse-level 0.8s ease infinite alternate;
}

@keyframes pulse-level {
    0% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 20px 60px rgba(255, 78, 153, 0.6);
    }
    100% { 
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 25px 80px rgba(255, 78, 153, 0.8);
    }
}

.level-up-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.level-up-icon {
    font-size: 5em;
    animation: trophy-spin 2s ease infinite;
}

@keyframes trophy-spin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    50% { transform: rotate(10deg) scale(1.2); }
    75% { transform: rotate(-10deg) scale(1.1); }
}

.level-up-title {
    font-size: 2.5em;
    font-weight: 900;
    line-height: 1;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.level-up-message {
    font-size: 1.3em;
    font-weight: 700;
    opacity: 0.95;
}

/* Адаптація для мобільних */
@media (max-width: 768px) {
    .points-earned-notification,
    .streak-notification-lesson {
        right: -100%;
        min-width: 280px;
        padding: 15px 20px;
        top: 10px;
    }
    
    .points-earned-notification.show,
    .streak-notification-lesson.show {
        right: 10px;
    }
    
    .streak-notification-lesson.show {
        top: 80px;
    }
    
    .points-icon,
    .streak-icon {
        font-size: 2.5em;
    }
    
    .points-amount {
        font-size: 1.6em;
    }
    
    .points-message {
        font-size: 0.9em;
    }
    
    .streak-amount {
        font-size: 1.5em;
    }
    
    .streak-message {
        font-size: 0.85em;
    }
    
    .level-up-notification-lesson {
        padding: 30px 40px;
        max-width: 90%;
    }
    
    .level-up-icon {
        font-size: 4em;
    }
    
    .level-up-title {
        font-size: 2em;
    }
    
    .level-up-message {
        font-size: 1.1em;
    }
}

.points-earned-notification,
.streak-notification-lesson,
.level-up-notification-lesson {
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
}

.points-earned-notification:not(.show),
.streak-notification-lesson:not(.show) {
    animation: slide-out 0.3s ease forwards;
}

@keyframes slide-out {
    to {
        right: -400px;
        opacity: 0;
    }
}
/* ==================== STREAK CONTAINER ==================== */
.streak-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 15px;
}

.streak-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-left: 0; 
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
}

@media (max-width: 768px) {
  .streak-icon-wrapper {
    margin-left: -50px;
  }
}

.streak-icon-wrapper:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.streak-fire {
  font-size: 1.8em;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.6));
}

/* Активний стан (помаранчевий) */
.streak-fire.active {
  color: #ff6b35;
  animation: fireFlicker 2s ease-in-out infinite;
}

/* Неактивний стан (сірий) */
.streak-fire.inactive {
  color: #888;
  filter: drop-shadow(0 0 4px rgba(136, 136, 136, 0.3));
}

@keyframes fireFlicker {
  0%, 100% { 
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.6));
  }
  50% { 
    transform: scale(1.05) rotate(-2deg);
    filter: drop-shadow(0 0 12px rgba(255, 107, 53, 0.8));
  }
}

.streak-number {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: var(--lime);
  color: #131010;
  font-size: 0.75em;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  min-width: 20px;
  text-align: center;
}

/* ==================== CALENDAR POPUP ==================== */
.streak-calendar-popup {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  padding: 20px;
  min-width: 320px;
  max-width: 360px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 9999;
  border: 2px solid #e0e0e0;
  pointer-events: none;
}

.streak-calendar-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.streak-icon-wrapper:hover + .streak-calendar-popup,
.streak-calendar-popup:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Додаємо клас для JS контролю */
.streak-container:hover .streak-calendar-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Трикутник вгорі */
.streak-calendar-popup::before {
  content: '';
  position: absolute;
  top: -10px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--white);
}

.calendar-header {
  margin-bottom: 15px;
}

.calendar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2em;
  font-weight: bold;
  color: #131010;
  margin-bottom: 12px;
}

.calendar-title i {
  color: var(--orange);
  font-size: 1.3em;
}

.calendar-stats {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 10px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.8em;
  color: #666;
}

.stat-value {
  font-size: 1.1em;
  font-weight: bold;
  color: #131010;
}

/* ==================== CALENDAR GRID ==================== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 15px 0;
}

.calendar-day {
  aspect-ratio: 1;
  border-radius: 6px;
  background: #e0e0e0;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #d0d0d0;
  min-height: 30px;
}

.calendar-day:hover {
  transform: scale(1.15);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-day.active {
  background:var(--orange) !important;
  border: 1px solid #ff5722;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.4);
}

.calendar-day.today {
  background: var(--lime) !important;
  border: 3px solid #131010;
  box-shadow: 0 0 15px rgba(198, 223, 43, 0.8);
  transform: scale(1.1);
}

.calendar-day.inactive {
  background: #f5f5f5 !important;
  border: 1px solid #e8e8e8;
}

/* Tooltip при наведенні */
.calendar-day::after {
  content: attr(data-date);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #131010;
  color: var(--white);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}

.calendar-day:hover::after {
  opacity: 1;
}

/* ==================== LEGEND ==================== */
.calendar-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 0.85em;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ==================== TOAST NOTIFICATION ==================== */
.streak-toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 15px 20px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 10000;
  border-left: 4px solid var(--orange);
}

.streak-toast-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-text strong {
  font-size: 1em;
  color: #131010;
}

.toast-text span {
  font-size: 0.9em;
  color: #666;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .streak-calendar-popup {
    right: -10px;
    left: auto;
    transform: translateY(-10px);
    min-width: 300px;
    max-width: 320px;
  }
  
  .streak-container:hover .streak-calendar-popup {
    transform: translateY(0);
  }
  
  .streak-calendar-popup::before {
    right: 25px;
    left: auto;
  }
  
  .calendar-grid {
    gap: 4px;
  }
}

.color-for-stik-1{
color: var(--orange);
}

.color-for-stik-2{
color: var(--lime);
}

.color-for-stik-3{
color: var(--gray);
}
/* ============================================
   EDITOR FOOTER - З ГОРИЗОНТАЛЬНИМ СКРОЛОМ
============================================ */

.editor-footer {
    background: #2d2d2d;
    padding: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(198, 223, 43, 0.5) rgba(255, 255, 255, 0.1);
}

.editor-footer::-webkit-scrollbar {
    height: 6px;
}

.editor-footer::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.editor-footer::-webkit-scrollbar-thumb {
    background: rgba(198, 223, 43, 0.5);
    border-radius: 3px;
}

.editor-footer::-webkit-scrollbar-thumb:hover {
    background: rgba(198, 223, 43, 0.7);
}

.btn {
    padding: 12px 60px;
    border: 2px solid var(--black);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 4px 4px 0px var(--black);
}

.btn:hover {
    box-shadow: 6px 6px 0px var(--black);
    transform: translate(-2px, -2px);
}

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

.btn-run {
    background-color: var(--lime);
    font-family: var(--font-family);
    border-radius: 20px;
    border: 2px solid var(--black);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0px var(--black);
}

.btn-run:hover {
    background: var(--pink);
    box-shadow: 6px 6px 0px var(--black);
    transform: translate(-2px, -2px);
}

.btn-run:active {
    box-shadow: 2px 2px 0px var(--black);
    transform: translate(2px, 2px);
}

.btn-ready {
    background: var(--pink);
    color: var(--black);
    font-family: var(--font-family);
    border-radius: 20px;
    border: 2px solid var(--black);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0px var(--black);
}

.btn-ready:hover {
    background: var(--lime);
    box-shadow: 6px 6px 0px var(--black);
    transform: translate(-2px, -2px);
}

.btn-ready:active {
    box-shadow: 2px 2px 0px var(--black);
    transform: translate(2px, 2px);
}

/* ============================================
   LAYOUT SWITCHER
============================================ */

.layout-switcher {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.layout-btn {
    width: 42px;
    height: 42px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 18px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.layout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.layout-btn:hover::before {
    width: 100%;
    height: 100%;
}

.layout-btn:hover {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.layout-btn.active {
    border-color: var(--blue);
    background: rgba(0, 157, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 157, 255, 0.4);
    animation: layout-pulse 2s ease-in-out infinite;
}

@keyframes layout-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 157, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 157, 255, 0.6);
    }
}

/* ============================================
   THEME SWITCHER
============================================ */

.theme-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* ==================== FONT SIZE CONTROLS ==================== */
.font-size-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.font-size-btn {
    width: 36px;
    height: 36px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Rubik', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.font-size-btn:hover {
    background: rgba(198, 223, 43, 0.3);
    border-color: var(--lime);
    transform: scale(1.1);
}

.font-size-btn:active {
    transform: scale(0.95);
}

.font-size-display {
    color: var(--lime);
    font-size: 13px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    font-family: 'Fira Code', monospace;
}

/* ==================== FONT FAMILY SELECTOR ==================== */
.font-family-selector {
    flex-shrink: 0;
}

.font-select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-family: 'Rubik', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    min-width: 140px;
}

.font-select:hover {
    border-color: var(--lime);
    background: rgba(255, 255, 255, 0.08);
}

.font-select:focus {
    border-color: var(--lime);
    box-shadow: 0 0 0 3px rgba(198, 223, 43, 0.2);
}

.font-select option {
    background: #1a1a2e;
    color: #fff;
    padding: 10px;
}

.theme-btn {
    width: 42px;
    height: 42px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.theme-btn:hover::before {
    width: 100%;
    height: 100%;
}

.theme-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.theme-btn.active {
    border-color: var(--lime);
    background: rgba(198, 223, 43, 0.2);
    box-shadow: 0 0 20px rgba(198, 223, 43, 0.4);
    animation: theme-pulse 2s ease-in-out infinite;
}

@keyframes theme-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(198, 223, 43, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(198, 223, 43, 0.6);
    }
}

/* ============================================
   ТЕМИ ДЛЯ РЕДАКТОРА - 6 THEMES
============================================ */

/* 🌙 1. Dark Theme (за замовчуванням) */
.editor-wrapper[data-theme="dark"] {
    background: #1e1e1e;
}

.editor-wrapper[data-theme="dark"] .line-numbers {
    background: #252526;
    color: var(--lime);
}

.editor-wrapper[data-theme="dark"] .code-editor {
    background: #1e1e1e;
    color: var(--pink);
}

/* ☀️ 2. Light Theme */
.editor-wrapper[data-theme="light"] {
    background: #ffffff;
}

.editor-wrapper[data-theme="light"] .line-numbers {
    background: #f5f5f5;
    color: var(--orange);
}

.editor-wrapper[data-theme="light"] .code-editor {
    background: #ffffff;
    color: #d81b60;
}

/* 🌊 3. Ocean Blue */
.editor-wrapper[data-theme="ocean"] {
    background: #1e3a5f;
}

.editor-wrapper[data-theme="ocean"] .line-numbers {
    background: #152d47;
    color: #64b5f6;
}

.editor-wrapper[data-theme="ocean"] .code-editor {
    background: #1e3a5f;
    color: #81d4fa;
}

/* 🌅 4. Sunset (НОВА!) */
.editor-wrapper[data-theme="sunset"] {
    background: #2d1810;
}

.editor-wrapper[data-theme="sunset"] .line-numbers {
    background: #1f0f08;
    color: #ffb74d;
}

.editor-wrapper[data-theme="sunset"] .code-editor {
    background: #2d1810;
    color: #ff8a65;
}

/* 🌲 5. Forest (НОВА!) */
.editor-wrapper[data-theme="forest"] {
    background: #1a2f1a;
}

.editor-wrapper[data-theme="forest"] .line-numbers {
    background: #0f1f0f;
    color: #81c784;
}

.editor-wrapper[data-theme="forest"] .code-editor {
    background: #1a2f1a;
    color: #aed581;
}

/* 💖 6. Pink Dream */
.editor-wrapper[data-theme="pink"] {
    background: #2d1b2e;
}

.editor-wrapper[data-theme="pink"] .line-numbers {
    background: #1f131f;
    color: #f48fb1;
}

.editor-wrapper[data-theme="pink"] .code-editor {
    background: #2d1b2e;
    color: #f8bbd0;
}

/* Плавні переходи */
.editor-wrapper,
.line-numbers,
.code-editor {
    transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================
   ТЕМИ ДЛЯ .column-center (проєкти)
============================================ */
.column-center[data-theme="dark"] .code-editor { background: #1E1E1E !important; color: #D4D4D4 !important; }
.column-center[data-theme="light"] .code-editor { background: #FAFAFA !important; color: #333 !important; }
.column-center[data-theme="ocean"] .code-editor { background: #1B2838 !important; color: #66C0F4 !important; }
.column-center[data-theme="sunset"] .code-editor { background: #2D1B2D !important; color: #FFB86C !important; }
.column-center[data-theme="forest"] .code-editor { background: #1D2D1D !important; color: #98C379 !important; }
.column-center[data-theme="pink"] .code-editor { background: #2D1B2B !important; color: #FF79C6 !important; }

.column-center[data-theme="dark"] .line-numbers { background: #252526 !important; color: #858585 !important; }
.column-center[data-theme="light"] .line-numbers { background: #f5f5f5 !important; color: #999 !important; }
.column-center[data-theme="ocean"] .line-numbers { background: #152d47 !important; color: #64b5f6 !important; }
.column-center[data-theme="sunset"] .line-numbers { background: #1f0f08 !important; color: #ffb74d !important; }
.column-center[data-theme="forest"] .line-numbers { background: #0f1f0f !important; color: #81c784 !important; }
.column-center[data-theme="pink"] .line-numbers { background: #1f131f !important; color: #f48fb1 !important; }
/* ============================================
   HORIZONTAL LAYOUT
============================================ */

.main-container[data-layout="horizontal"] {
    display: flex !important;
    flex-direction: row !important;
}

.main-container[data-layout="horizontal"] .column-left,
.main-container[data-layout="horizontal"] .column-center,
.main-container[data-layout="horizontal"] .column-right {
    border-right: 2px solid #e0e0e0;
}

.main-container[data-layout="horizontal"] .column-right {
    border-right: none;
}

.main-container[data-layout="horizontal"] .resizer {
    display: block !important;
    cursor: col-resize;
}

/* ============================================
   VERTICAL LAYOUT - З RESIZERS
============================================ */

.main-container[data-layout="vertical"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
    height: calc(100vh - 140px);
}

.main-container[data-layout="vertical"] .column-left {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    overflow-y: auto;
    border-right: 2px solid #e0e0e0;
    position: relative;
}

.main-container[data-layout="vertical"] .column-center {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    border-bottom: 2px solid #e0e0e0;
    position: relative;
}

.main-container[data-layout="vertical"] .column-right {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    position: relative;
}

/* Resizers у вертикальному режимі */
.main-container[data-layout="vertical"] .column-left > .resizer {
    display: block !important;
    cursor: col-resize;
    width: 5px;
    right: -2.5px;
}

.main-container[data-layout="vertical"] .column-center > .resizer {
    display: block !important;
    cursor: row-resize;
    width: 100%;
    height: 5px;
    bottom: -2.5px;
    top: auto;
    right: 0;
}

.main-container[data-layout="vertical"] .column-right > .resizer {
    display: none !important;
}
/* ============================================
   RESIZER - ОПТИМІЗАЦІЯ
============================================ */

.resizer {
    width: 5px;
    cursor: col-resize;
    background: transparent;
    position: absolute;
    top: 0;
    bottom: 0;
    right: -2.5px;
    z-index: 10;
    transition: background 0.2s;
}

.resizer:hover {
    background: var(--lime);
}

.resizer.resizing {
    background: var(--lime);
}

/* Плавні переходи ВИМКНЕНІ під час resize */
.main-container.resizing,
.main-container.resizing * {
    transition: none !important;
}

.main-container[data-layout="vertical"] .column-center > .resizer {
    width: 100%;
    height: 5px;
    bottom: -2.5px;
    top: auto;
    right: 0;
    cursor: row-resize;
}
/* ============================================
   ВЕРТИКАЛЬНИЙ LAYOUT - БЕЗ RESIZER'ІВ
============================================ */

.main-container[data-layout="vertical"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 50vh 1fr;
    gap: 0;
    height: calc(100vh - 140px);
}

.main-container[data-layout="vertical"] .column-left {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    width: 100% !important;
    max-height: none !important;
    height: 100% !important;
    overflow-y: auto;
    border-right: 2px solid #e0e0e0;
    border-bottom: none !important;
    flex: none !important;
}

.main-container[data-layout="vertical"] .column-center {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    border-right: none !important;
    border-bottom: 2px solid #e0e0e0;
    flex: none !important;
}

.main-container[data-layout="vertical"] .column-right {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    flex: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

/* ❌ RESIZER'И НЕ ПРАЦЮЮТЬ В VERTICAL */
.main-container[data-layout="vertical"] .resizer {
    display: none !important;
}

.main-container {
    transition: all 0.3s ease;
}

.main-container .column-left,
.main-container .column-center,
.main-container .column-right {
    transition: all 0.3s ease;
}

/* ============================================
   АДАПТАЦІЯ ДЛЯ МОБІЛЬНИХ
============================================ */

@media (max-width: 768px) {
    .editor-footer {
        padding: 12px;
        gap: 8px;
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .btn-run,
    .btn-ready {
        padding: 12px 40px;
        font-size: 15px;
        flex-shrink: 0;
    }
    
    .layout-switcher {
        display: none;
    }
    
    .theme-switcher {
        flex-shrink: 0;
    }

    .theme-btn {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .font-size-controls {
        padding: 4px 8px;
        gap: 4px;
    }

    .font-size-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .font-size-display {
        font-size: 11px;
        min-width: 35px;
    }

    .font-family-selector {
        display: none;
    }
}

@media (max-width: 480px) {
    .font-size-controls {
        display: none;
    }
}

.custom-icon {
  width: 55px; 
  height: 35px; 
}

.top-reward-notification {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: linear-gradient(135deg, #FF9F00 0%, #FF4E99 50%, #009DFF 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 100000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.top-reward-notification.show {
    top: 20px;
    opacity: 1;
}

.top-reward-content {
    display: flex;
    gap: 20px;
    padding: 25px;
    position: relative;
}

.top-reward-left {
    flex-shrink: 0;
}

.top-reward-icon-large {
    font-size: 80px;
    animation: bounceRotate 2s infinite;
}

@keyframes bounceRotate {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(5deg);
    }
}

.top-reward-right {
    flex: 1;
    color: white;
}

.top-reward-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 8px;
    backdrop-filter: blur(10px);
}

.top-reward-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.top-reward-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 8px;
}

.top-reward-message {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.top-reward-hint {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 13px;
    backdrop-filter: blur(10px);
    display: inline-block;
}

.top-reward-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.top-reward-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.top-reward-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.top-reward-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: white;
    animation: progressBar 7s linear;
}

@keyframes progressBar {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.top-reward-notification.hiding {
    animation: slideUpFade 0.5s ease-out forwards;
}

@keyframes slideUpFade {
    to {
        top: -200px;
        opacity: 0;
    }
}

/* МОБІЛЬНА ВЕРСІЯ */
@media (max-width: 768px) {
    .top-reward-notification {
        width: 95%;
        max-width: none;
    }
    
    .top-reward-content {
        padding: 20px;
        gap: 15px;
    }
    
    .top-reward-icon-large {
        font-size: 60px;
    }
    
    .top-reward-title {
        font-size: 22px;
    }
    
    .top-reward-subtitle {
        font-size: 14px;
    }
    
    .top-reward-message {
        font-size: 13px;
    }
    
    .top-reward-hint {
        font-size: 12px;
        padding: 8px 12px;
    }
}
/* ============================================
   ІНТЕРАКТИВНІ ДЕМО
   ============================================ */

.interactive-demo {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.interactive-demo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.demo-button {
    font-family: 'Rubik', sans-serif;
    transition: all 0.2s ease !important;
}

.demo-button:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.demo-button:active {
    transform: scale(0.95) !important;
}

#counterOutput {
    transition: all 0.3s ease;
}

#clickCount {
    display: inline-block;
    transition: all 0.2s ease;
    font-size: 32px;
}

/* Адаптивність для мобілок */
@media (max-width: 768px) {
    .interactive-demo {
        padding: 15px !important;
    }
    
    .demo-button {
        width: 100%;
        padding: 15px !important;
        font-size: 14px !important;
    }
    
    #clickCount {
        font-size: 24px;
    }
}
/* Reward Notification */
.reward-notification-lesson {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.reward-notification-lesson.show {
    opacity: 1;
    transform: translateX(0);
}

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

/* Premium Reward Notification */
.premium-reward-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.premium-reward-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .reward-notification-lesson,
    .premium-reward-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
/* ============================================
   KOODI PYTHON EDITOR - Additional Styles
   ============================================ */

/* ============================================
   TERMINAL STYLES
   ============================================ */

.python-terminal {
    background: #1E1E1E;
    border-radius: 12px;
    overflow: hidden;
}

.python-terminal .preview-header {
    background: linear-gradient(135deg, #306998, #4B8BBE);
    padding: 12px 20px;
    border-bottom: 2px solid #FFD43B;
}

.python-terminal .url-bar {
    color: #FFFFFF;
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 0.95em;
    display: flex;
    align-items: center;
}

.python-terminal .url-bar i {
    color: #FFD43B;
}

.terminal-content {
    background: #0D1117;
    min-height: 300px;
    height: 100%;
    padding: 20px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 18px;
    color: #E6EDF3;
    overflow-y: auto;
}

.terminal-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    text-align: center;
    color: #8B949E;
}

.terminal-placeholder .icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: snakeBounce 2s ease-in-out infinite;
}

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

.terminal-placeholder p {
    margin: 0;
    line-height: 1.6;
}

.terminal-output {
    font-family: 'Fira Code', 'Courier New', monospace;
}

.terminal-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #30363D;
}

.prompt-symbol {
    color: #7EE787;
    font-weight: bold;
}

.prompt-text {
    color: #58A6FF;
}

.terminal-result {
    padding: 10px 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-result.success {
    color: #7EE787;
}

.terminal-result.error {
    color: #F85149;
    background: rgba(248, 81, 73, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #F85149;
}

.terminal-result.empty {
    color: #8B949E;
    font-style: italic;
}

.terminal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 40px;
    color: #FFD43B;
}

.loading-snake {
    font-size: 2em;
    animation: snakeWiggle 0.5s ease-in-out infinite;
}

@keyframes snakeWiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* ============================================
   PYTHON EDITOR FILE TAB
   ============================================ */

.column-center .file-tab {
    background: linear-gradient(135deg, #306998, #4B8BBE);
}

.column-center .file-tab .file-icon {
    width: 20px;
    height: 20px;
}

/* ============================================
   PYTHON SPECIFIC SYNTAX HIGHLIGHTING
   ============================================ */

.code-editor {
    color: #D4D4D4;
}

/* Theme Variations for Python */
[data-theme="dark"] .code-editor {
    background: #1E1E1E;
    color: #D4D4D4;
}

[data-theme="light"] .code-editor {
    background: #FFFFFF;
    color: #383A42;
}

[data-theme="ocean"] .code-editor {
    background: #0D1B2A;
    color: #E0E1DD;
}

[data-theme="sunset"] .code-editor {
    background: #2D1B2D;
    color: #F8B500;
}

[data-theme="forest"] .code-editor {
    background: #1A2F1A;
    color: #A8D5BA;
}

[data-theme="pink"] .code-editor {
    background: #2D1F2D;
    color: #FFB6C1;
}

/* ============================================
   ERROR MODAL STYLES
   ============================================ */

.error-message {
    background: #1E1E1E;
    color: #F85149;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    margin: 15px 0;
    border-left: 3px solid #F85149;
}

.error-hints {
    background: #306998;
    color: #FFFFFF;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.error-hints p {
    margin: 8px 0;
}

/* ============================================
   SUCCESS MODAL PYTHON THEME
   ============================================ */

#completionModal .modal {
    border-top: 4px solid #FFD43B;
}


/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .terminal-content {
        min-height: 200px;
        font-size: 16px;
    }
    
    .terminal-placeholder .icon {
        font-size: 3em;
    }
}

/* ============================================
   SNAKE ANIMATION FOR SUCCESS
   ============================================ */

@keyframes snakeSlither {
    0% { transform: translateX(-100%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(10deg); }
    50% { transform: translateX(0%) rotate(-10deg); }
    75% { transform: translateX(50%) rotate(10deg); }
    100% { transform: translateX(100%) rotate(0deg); }
}

.snake-animation {
    animation: snakeSlither 2s ease-in-out;
}
    /* ============================================
       ATTRIBUTE UNLOCK MODAL STYLES
       ============================================ */
    
    .attribute-unlock-modal {
        max-width: 420px;
        text-align: center;
        padding: 30px;
        border-radius: 20px;
        background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
        border: 3px solid #306998;
        box-shadow: 0 0 60px rgba(48, 105, 152, 0.5), 0 0 100px rgba(255, 212, 59, 0.3);
        overflow: visible;
    }

    .unlock-animation-container {
        position: relative;
        width: 150px;
        height: 150px;
        margin: 0 auto 20px;
    }

    .unlock-glow {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 120px;
        height: 120px;
        background: radial-gradient(circle, rgba(255, 212, 59, 0.6) 0%, rgba(48, 105, 152, 0.3) 50%, transparent 70%);
        border-radius: 50%;
        animation: glowPulse 2s ease-in-out infinite;
    }

    @keyframes glowPulse {
        0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
        50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    }

    .unlock-icon-wrapper {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100px;
        height: 100px;
        background: linear-gradient(135deg, #306998, #FFD43B);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 32px rgba(48, 105, 152, 0.5);
        border: 3px solid #FFD43B;
    }

    .unlock-icon {
        font-size: 3.5em;
        animation: snakeBounce 1s ease-in-out infinite;
    }

    .unlock-icon.spinning {
        animation: snakeAppear 0.8s ease-out, snakeWiggle 0.5s ease-in-out 0.8s infinite;
    }

    @keyframes snakeAppear {
        0% { transform: scale(0) rotate(-180deg); opacity: 0; }
        50% { transform: scale(1.3) rotate(10deg); }
        100% { transform: scale(1) rotate(0deg); opacity: 1; }
    }

    @keyframes snakeWiggle {
        0%, 100% { transform: rotate(-5deg); }
        50% { transform: rotate(5deg); }
    }

    @keyframes snakeBounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-5px); }
    }

    .unlock-particles {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }

    .particle {
        position: absolute;
        font-size: 1.5em;
        animation: particleFly 2s ease-out infinite;
    }

    .particle:nth-child(1) { animation-delay: 0s; top: 0; left: 50%; }
    .particle:nth-child(2) { animation-delay: 0.3s; top: 20%; left: 90%; }
    .particle:nth-child(3) { animation-delay: 0.6s; top: 70%; left: 95%; }
    .particle:nth-child(4) { animation-delay: 0.9s; top: 90%; left: 50%; }
    .particle:nth-child(5) { animation-delay: 1.2s; top: 70%; left: 5%; }
    .particle:nth-child(6) { animation-delay: 1.5s; top: 20%; left: 10%; }

    @keyframes particleFly {
        0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
        20% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
        100% { transform: translate(calc(-50% + var(--x, 20px)), calc(-50% + var(--y, -30px))) scale(0); opacity: 0; }
    }

    .particle:nth-child(1) { --x: 0px; --y: -40px; }
    .particle:nth-child(2) { --x: 35px; --y: -20px; }
    .particle:nth-child(3) { --x: 35px; --y: 20px; }
    .particle:nth-child(4) { --x: 0px; --y: 40px; }
    .particle:nth-child(5) { --x: -35px; --y: 20px; }
    .particle:nth-child(6) { --x: -35px; --y: -20px; }

    .unlock-title {
        color: #FFD43B;
        font-size: 1.6em;
        margin: 15px 0;
        text-shadow: 0 0 20px rgba(255, 212, 59, 0.5);
    }

    .unlocked-attribute-card {
        background: linear-gradient(135deg, rgba(48, 105, 152, 0.3), rgba(255, 212, 59, 0.1));
        border: 2px solid #306998;
        border-radius: 15px;
        padding: 20px;
        margin: 20px 0;
    }

    .attribute-preview {
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
    }

    .attribute-icon-large {
        font-size: 3em;
        background: linear-gradient(135deg, #306998, #4B8BBE);
        width: 70px;
        height: 70px;
        border-radius: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #FFD43B;
        flex-shrink: 0;
    }

    .attribute-info h4 {
        color: #FFD43B;
        margin: 0 0 5px 0;
        font-size: 1.3em;
    }

    .attribute-description {
        color: #E6EDF3;
        margin: 0 0 8px 0;
        font-size: 0.95em;
    }

    .attribute-layer {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: rgba(48, 105, 152, 0.5);
        color: #7EE787;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.8em;
    }

    .unlock-message {
        margin: 20px 0;
        color: #E6EDF3;
    }

    .unlock-message p {
        margin: 8px 0;
    }

    .unlock-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    .unlock-btn-primary {
        background: linear-gradient(135deg, #306998, #FFD43B) !important;
        color: #000 !important;
        font-weight: bold;
        padding: 12px 25px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    .unlock-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(255, 212, 59, 0.4);
    }

    .unlock-btn-secondary {
        background: transparent;
        color: #8B949E;
        border: 1px solid #30363D;
        padding: 10px 20px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s;
    }

    .unlock-btn-secondary:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #E6EDF3;
        border-color: #FFD43B;
    }

    /* Responsive */
    @media (max-width: 480px) {
        .attribute-unlock-modal {
            margin: 10px;
            padding: 20px;
        }
        
        .attribute-preview {
            flex-direction: column;
            text-align: center;
        }
        
        .unlock-animation-container {
            width: 120px;
            height: 120px;
        }
        
        .unlock-icon-wrapper {
            width: 80px;
            height: 80px;
        }
        
        .unlock-icon {
            font-size: 2.5em;
        }
    }

/* =========================================================================
   DROPDOWN NAVIGATION
   ========================================================================= */
.main-menu {
    display: flex;
    gap: 40px;
    margin: 0 auto;
    align-items: center;
}
.nav-dropdown {
    position: relative;
}
.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropdown-trigger i {
    font-size: 14px;
    transition: transform 0.3s ease;
}
.nav-dropdown:hover .dropdown-trigger i {
    transform: rotate(180deg);
}
/* Dropdown контент - БІЛЬШИЙ */
.dropdown-content {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 340px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}
/* Стрілочка зверху */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--white);
}
.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
/* Елементи dropdown - БІЛЬШІ */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--black);
    transition: all 0.2s ease;
}
.dropdown-item:hover {
    background: var(--gray-100, #f5f5f5);
}
.dropdown-item i {
    font-size: 26px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--gray-100, #f5f5f5);
    color: var(--black);
    transition: all 0.2s ease;
}
/* Кольори для іконок при hover */
.dropdown-item:hover i {
    background: var(--lime);
    color: var(--black);
}
.dropdown-item div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dropdown-title {
    display: block;
    font-weight: 600;
    font-size: 18px;
}
.dropdown-desc {
    display: block;
    font-size: 14px;
    color: var(--gray-500, #6c757d);
}
/* Header actions group */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Точка-розділювач */
.nav-dot {
    color: var(--gray-400, #adb5bd);
    font-size: 10px;
    user-select: none;
}

/* =========================================================================
   RESPONSIVE - ховаємо dropdown на мобільних
   ========================================================================= */
@media (max-width: 1024px) {
    .nav-dropdown .dropdown-content {
        display: none;
    }

    .dropdown-trigger i {
        display: none;
    }

    .nav-dot {
        display: none;
    }
}

/* ============================================
   CONSOLE OUTPUT STYLES - GLOBAL
   Стилі для виводу консолі в усіх уроках
   ============================================ */
.console-output {
    width: 100%;
    height: 100%;
    padding: 15px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    overflow-y: auto;
    background: #1e1e1e;
}

.console-line {
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #4fc3f7;
    word-wrap: break-word;
    color: #e0e0e0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.console-line.console-log {
    border-left-color: #4fc3f7;
}

.console-line.console-error {
    background: rgba(255, 107, 107, 0.1);
    border-left-color: #ff6b6b;
    color: #ff6b6b;
}

.console-line.console-warn {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
    color: #ffc107;
}

.console-line.console-success {
    background: rgba(76, 175, 80, 0.15);
    border-left-color: #4CAF50;
    color: #81c784;
    font-style: italic;
}

.console-line.console-info {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: #2196f3;
    color: #90caf9;
}

.console-number {
    color: #b5cea8;
    font-weight: 500;
}

.console-string {
    color: #ce9178;
}

.console-boolean {
    color: #569cd6;
    font-weight: 500;
}

.console-null,
.console-undefined {
    color: #808080;
    font-style: italic;
}

.console-array {
    color: #c6df2b;
}

.console-object {
    color: #dcdcaa;
}

.console-output::-webkit-scrollbar {
    width: 6px;
}

.console-output::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.console-output::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.console-output::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Responsive console */
@media (max-width: 768px) {
    .console-output {
        padding: 10px;
        font-size: 13px;
    }

    .console-line {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ============================================
   STEP HINTS (ЛАЙФХАКИ) - GLOBAL
   Стилі для підказок в усіх уроках
   ============================================ */
.step-hints {
    background: var(--white, #FDF7F7);
    padding: 25px;
    border-radius: 20px;
    margin: 25px 0;
    border: 4px solid var(--black, #131010);
    box-shadow: 8px 8px 0 var(--blue, #009DFF);
}

.step-hints h3 {
    color: var(--black, #131010) !important;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
}

.paid-badge {
    background: var(--orange, #FF9F00);
    color: var(--black, #131010);
    font-size: 0.7em;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: bold;
}

.step-hint {
    background: #f5f5f5;
    border-radius: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    overflow: hidden;
}

.step-hint-header {
    padding: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s;
}

.step-hint-header:hover {
    background: #eee;
}

.step-hint-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: var(--black, #131010);
}

.step-number-badge {
    background: var(--blue, #009DFF);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    flex-shrink: 0;
}

.step-hint-toggle {
    color: #888;
    font-size: 1.2em;
    transition: transform 0.3s;
}

.step-hint.open .step-hint-toggle {
    transform: rotate(180deg);
}

.step-hint-content {
    display: none;
    padding: 0 15px 15px 15px;
    border-top: 1px solid #ddd;
}

.step-hint.open .step-hint-content {
    display: block;
}

.step-hint-content p {
    color: #555;
    font-size: 0.95em;
    margin: 10px 0;
    line-height: 1.6;
}

/* CODE SNIPPET - ВЕЛИКИЙ РОЗМІР! Перекриває всі інлайн стилі */
.code-snippet,
div.code-snippet,
.column-left .code-snippet,
.step-hint-content .code-snippet,
body .code-snippet,
body .step-hint-content .code-snippet,
body .column-left .code-snippet,
html body .code-snippet {
    background: #1e1e1e !important;
    padding: 18px 20px !important;
    border-radius: 12px !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #c6df2b !important;
    overflow-x: auto !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    margin: 15px 0 !important;
    border: 2px solid #333 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* CODE EXAMPLE - ВЕЛИКИЙ РОЗМІР! */
.code-example,
.column-left .code-example,
div.code-example {
    background: #1e1e1e !important;
    border: 2px solid #444 !important;
    border-radius: 12px !important;
    padding: 18px 20px !important;
    margin: 15px 0 !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #e0e0e0 !important;
    overflow-x: auto !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

.code-example code,
.code-snippet code,
.column-left .code-example code,
.column-left .code-snippet code {
    font-family: 'Fira Code', 'Courier New', monospace !important;
    font-size: 15px !important;
    background: transparent !important;
    padding: 0 !important;
    color: inherit !important;
}

/* Inline code в тексті */
p code,
li code,
.task-requirements code,
.skill-card code,
.challenge-tasks code,
.pattern-card code,
.detail-block code,
.warning-box code {
    background: #2d2d2d !important;
    color: #c6df2b !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* Pre blocks - ВЕЛИКИЙ РОЗМІР */
pre,
.theme-code pre,
.code-block pre,
.code-block-content pre {
    background: #1e1e1e !important;
    padding: 18px 20px !important;
    border-radius: 12px !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #c6df2b !important;
    overflow-x: auto !important;
    margin: 15px 0 !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
}

/* Всі code елементи в картках та блоках */
.quiz-code,
.story-code,
.bad-code,
.good-code,
.refactor-code {
    font-family: 'Fira Code', 'Courier New', monospace !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    padding: 15px 18px !important;
}

/* ============================================
   ГЛОБАЛЬНІ ПЕРЕКРИТТЯ ДЛЯ КОДУ - ВСІХ УРОКІВ
   Використовуємо !important для перекриття інлайн стилів
   ============================================ */

/* Чат-бот демо елементи */
.chat-message pre,
.chat-bubble pre,
.message-content pre,
.bot-response pre {
    font-size: 15px !important;
    line-height: 1.7 !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
    background: #1e1e1e !important;
    padding: 15px !important;
    border-radius: 10px !important;
    color: #c6df2b !important;
}

/* Код в картках уроків */
.skill-card code,
.challenge-tasks code,
.theme-code pre,
.code-block pre,
.code-output p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
}

/* Виводи консолі в уроках */
.theme-output p,
.code-output p,
.console-output p,
.preview-output p {
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
    color: #c6df2b !important;
}

/* Всі pre та code блоки з високим пріорітетом */
body .column-left pre,
body .column-left code,
html body pre,
html body .code-block pre,
html body .theme-code pre {
    font-size: 15px !important;
    line-height: 1.7 !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
}

/* Responsive hints */
@media (max-width: 768px) {
    .step-hints {
        padding: 15px;
    }

    .step-hint-content .code-snippet,
    .code-snippet,
    .code-example,
    pre {
        font-size: 14px !important;
        padding: 12px;
    }
}

/* ============================================
   🐛 БАГ-ФІКСИ ДЛЯ JAVA КУРСІВ
   ============================================ */

/* БАГ 1: Збільшений розмір коду + контраст */
.code-example,
.code-block,
#hintModal pre {
    font-size: 16px !important;
    line-height: 1.7 !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
    background: #1e1e1e !important;
    color: #d4d4d4 !important;
    padding: 18px !important;
    border-radius: 12px !important;
    overflow-x: auto !important;
    white-space: pre-wrap !important;
}

/* Світлий текст на темному фоні для всіх блоків коду */
.code-example *,
.code-block *,
.code-content * {
    color: inherit !important;
}

/* Синтаксис підсвітка */
.code-example .keyword,
.code-content .keyword { color: #569cd6 !important; }
.code-example .string,
.code-content .string { color: #ce9178 !important; }
.code-example .comment,
.code-content .comment { color: #6a9955 !important; }
.code-example .number,
.code-content .number { color: #b5cea8 !important; }
.code-example .class-name,
.code-content .class-name { color: #4ec9b0 !important; }
