:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --background-color: #f3f4f6;
    --surface-color: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--background-color);
    color: var(--text-primary);
    transition: var(--transition);
    overflow: hidden;
}

header {
    background-color: var(--surface-color);
    color: var(--primary-color);
    text-align: center;
    padding: 1em;
    box-shadow: var(--box-shadow);
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    margin: 0;
    font-size: 2em;
    font-weight: 700;
    flex: 1;
}

/* Language Switcher Styles */
.language-switcher {
    position: absolute;
    right: 1.5em;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
    padding: 6px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.85em;
    position: relative;
    overflow: hidden;
    background: transparent;
    border: 1px solid transparent;
}

.language-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.language-btn:hover:before {
    left: 100%;
}

.language-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.3);
}

.language-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.language-btn.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

.flag {
    font-size: 1.1em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.lang-text {
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    user-select: none;
}

.language-btn:not(.active) {
    color: var(--primary-color);
}

.language-btn:not(.active):hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .language-switcher {
        right: 1em;
        gap: 4px;
        padding: 4px;
    }

    .language-btn {
        padding: 6px 8px;
        font-size: 0.8em;
        gap: 4px;
    }

    .flag {
        font-size: 1em;
    }
}

main {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px);
    position: fixed;  
    top: 70px;    
    left: 0;         
    right: 0;       
    bottom: 0;       
   
}

/* Make sure pre tags don't overflow */
pre {
    white-space: pre-wrap;
    word-break: break-word;
    width: 100%;
    box-sizing: border-box;
}

ul {
    list-style: none;
    padding: 0;
}
ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}
ul li::before {
    content: '✔️'; /* Εικονίδιο ή σύμβολο */
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

#tutorial-steps {
    width: 25%;
    min-width: 300px;
    height: 100%;
    max-height: calc(100vh - 60px);
    background-color: var(--surface-color);
    padding: 1em;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 5;
    scrollbar-width: thin !important;
    scrollbar-color: var(--primary-color) transparent !important;
    /* Professional scrollbar enforcement */
    -webkit-overflow-scrolling: touch;
}

#tutorial-steps.expanded {
    overflow: hidden;
}

#workspace-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

#blocklyDiv {
    flex: 1;
    width: 100%;
}

#code-container {
    width: 30%;
    min-width: 400px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--surface-color);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#codeOutput {
    flex: 2;
    padding: 1em;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--text-secondary);
}

#executionOutput {
    flex: 1;
    padding: 1em;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: #f5f5f5;
}

#output {
    flex: 1;
    overflow-y: auto;
    background-color: #ffffff;
    border-radius: var(--border-radius);
    padding: 10px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
    word-break: break-word;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    min-height: 200px;
    max-height: 200px;
    border: 1px solid var(--text-secondary);
}


/* ===== SMART SEPARATORS CSS  ===== */

/* Resize handles */
.resize-handle {
    width: 8px;
    background: #d1d5db;
    cursor: col-resize;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
}

.resize-handle:hover {
    background: #6366f1;
    width: 10px;
}

/* NEW: Drag indicator dots */
.resize-handle::before {
    content: '⋮⋮';
    position: absolute;
    color: #9ca3af;
    font-size: 12px;
    line-height: 8px;
    letter-spacing: -2px;
    opacity: 0.6;
    transition: all 0.3s ease;
    z-index: 1;
}

.resize-handle:hover::before {
    color: white;
    opacity: 1;
}

.resize-handle:hover .arrow-btn {
    opacity: 1;
    pointer-events: auto;
}

/* Individual arrow buttons */
.arrow-btn {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 2px solid #6366f1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 9px;
    font-weight: bold;
    color: #6366f1;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);  /* ΜΟΝΟ ΑΥΤΟ - διαγράψτε το άλλο */
    user-select: none;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.8), 0 2px 8px rgba(99, 102, 241, 0.2);
    overflow: visible;
    backdrop-filter: blur(4px);
}

/* Hover effect */
.arrow-btn:hover {
    background: #6366f1;
    color: white;
    transform: translate(-50%, -50%) translateY(-1px) scale(1.02);    
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    border-color: #4f46e5;                      
}

/* Active click feedback */
.arrow-btn:active {
    transform: translate(-50%, -50%) translateY(-1px) scale(1.02);    
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.2);
    background: #4f46e5;                       
}

/* Focus state for accessibility */
.arrow-btn:focus {
    outline: none;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.12), 
                0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Subtle animation for discoverability */
.arrow-btn::before {
    content: '';
    position: absolute;
    top: -2px;                      
    left: -20px;                    
    width: calc(100% + 4px);        
    height: calc(100% + 4px);       
    pointer-events: none;        
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.arrow-btn:hover::before {
    left: 20px;
}


/* Close Bar για Expanded Mode */
.tutorial-close-bar {
    width: 8px;
    background: #6366f1;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tutorial-close-bar:hover {
    background: #6366f1;
    width: 10px;
}

.close-bar-dots {
    position: absolute;
    color: white;
    font-size: 12px;
    line-height: 8px;
    letter-spacing: -2px;
    opacity: 1;
    z-index: 1;
}

.close-bar-arrow {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    pointer-events: auto;
    width: 20px;
    height: 20px;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 2px solid #6366f1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 9px;
    font-weight: bold;
    color: #6366f1;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.8), 0 2px 8px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(4px);
}

.tutorial-close-bar:hover .close-bar-arrow {
    background: #6366f1;
    color: white;
    transform: translate(-50%, -50%) translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    border-color: #4f46e5;
}

.tutorial-close-bar:active .close-bar-arrow {
    transform: translate(-50%, -50%) translateY(-1px) scale(1.02);
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.2);
    background: #4f46e5;
}


/* Tutorial Components */
.tutorial-category {
    margin-bottom: 1rem;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.1), 0 2px 4px -1px rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tutorial-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.1), 0 4px 6px -2px rgba(99, 102, 241, 0.05);
}

.tutorial-category:not(:last-child) {
    position: relative;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-header:hover::before,
.category-header.active::before {
    opacity: 1;
}

.category-header:hover {
    background: linear-gradient(145deg, #ffffff, #f9fafb);
}

.category-header.active {
    background: linear-gradient(145deg, #eef2ff, #f5f7ff);
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    background: linear-gradient(135deg, #f0f2ff, #e8eaff);
    border-radius: 12px;
    font-size: 1.25rem;
}

.category-info {
    flex: 1;
}

.category-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7ff;
    border-radius: 50%;
    margin-left: 1rem;
    transition: all 0.3s ease;
}

.category-toggle i {
    color: var(--primary-color);
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.category-header:hover .category-toggle {
    background: var(--primary-color);
}

.category-header:hover .category-toggle i {
    color: white;
    transform: translateY(1px);
}

.category-toggle.rotated i {
    transform: rotate(-180deg);
}

.category-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.category-description {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.category-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    
    background: linear-gradient(180deg, #ffffff, #f9fafb);
    position: relative; 
}

.category-content.expanded::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 2.5rem;  
    height: calc(100% - 5rem); 
    width: 2px; 
    background: var(--primary-color);
    opacity: 0.7; 
    z-index: 1;
    
}


.category-content.expanded {
    max-height: fit-content;
    opacity: 1;
    padding: 0 1.25rem 0 3rem; 
    position: relative;
}

.tutorial-step {
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    border-radius: 16px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
}

.tutorial-step::before {
    display: none;
}

.tutorial-step:hover::before {
    opacity: 1;
}

.step-content-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    padding-left: 0.5rem; 
}

.step-text {
    flex: 1;
}

.tutorial-step:hover {
    background: #eef2ff;
    transform: translateX(4px); 
    border-radius: 8px;
}

.tutorial-step.completed:hover {
    background: linear-gradient(145deg, #f0fdf4, #ecfdf5);
}


.tutorial-step.completed {
    background: #eef2ff;
    border-color: var(--primary-color);
}

.tutorial-step.active {
    background: linear-gradient(145deg, #eef2ff, #e0e7ff);
    border-color: #6366f1;
}

.step-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.tutorial-step:hover .step-title::after {
    width: 100%;
}

.step-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}


.step-description {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Styles for step content */
.step-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    padding: 1rem;
    overflow-y: auto;
    scrollbar-width: thin;
    display: none;
    font-size: 1rem;
    line-height: 1.6;
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    z-index: 10;
    box-sizing: border-box;
}

.step-content.active {
    display: block;
    z-index: 100;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-bottom: 2px solid #eef2ff;
    margin: -1rem -1rem 2rem -1rem;
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    position: relative;
    padding-bottom: 0.5rem;
}

.step-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, transparent);
    border-radius: 4px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #6366f1;
    font-weight: 600;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    padding: 0;
}


.back-button:hover {
    background: #6366f1;
    color: white;
    transform: translateX(-4px);
}


.back-button i {
    font-size: 1.2rem;
    margin: 0;
}


/* Adjust the content sections to fit within the column */
.theory-section, 
.example-section, 
.exercise-section {
    width: 100%;
    box-sizing: border-box;
    
}

.theory-section {
    background: #E3F2FD; 
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.example-section {
    background: #E8F5E9; 
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.exercise-section {
    background: #FFFDE7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.example-section ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.example-section ol li {
    margin-bottom: 0.5rem;
}

.section-title {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.section-title::before {
    content: '📘'; 
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.code-block {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Fira Code', monospace;
    margin: 1rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.step-title-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.title-accent {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

.title-accent svg {
    width: 100%;
    height: 100%;
}



/* Προσθήκη animation για το fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation για το expand/collapse */
@keyframes slideDown {
    from { 
        transform: translateY(-8px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.category-content.expanded .tutorial-step {
    animation: slideDown 0.4s ease-out forwards;
}



/* Animation για το expand/collapse */
@keyframes slideDown {
    from { 
        transform: translateY(-8px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.category-content.expanded .tutorial-step {
    animation: slideDown 0.4s ease-out forwards;
}



/* UI Components */
.tutorial-main-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5em 1em;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9em;
    font-weight: 600;
    margin: 0.5em 0;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

button:hover {
    background-color: var(--primary-dark);
}

#runPythonButton {
    align-self: flex-end;
    margin-top: 10px;
    background-color: var(--secondary-color);
}

#runPythonButton:hover {
    background-color: #0e9f6e;
}

h3 {
    margin-bottom: 0.5em;
    font-size: 1.1em;
    color: var(--primary-color);
}

/* CodeMirror Customization */
.CodeMirror {
    height: 400px !important;
    border-radius: var(--border-radius);
    border: 1px solid var(--text-secondary);
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
}

.CodeMirror-scroll {
    overflow-y: auto !important;
    overflow-x: auto !important;
}

.CodeMirror-gutters {
    background-color: #f7f7f7;
    border-right: 1px solid #ddd;
}

.CodeMirror-linenumber {
    color: #999;
    padding-right: 10px;
}

/* Scrollbar Styling */
#tutorial-steps::-webkit-scrollbar
{
    width: 8px;
}

#tutorial-steps::-webkit-scrollbar-track
{
    background: var(--background-color);
    border-radius: 4px;
}

#tutorial-steps::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
    border: 2px solid var(--background-color);
}

#tutorial-steps::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-dark);
}

/* Animations */
@keyframes selectCategory {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.pulse {
    animation: pulse 2s infinite;
}

/*STEPS*/

.step-number {
    position: absolute;
    left: -2rem; /* Μικρή προσαρμογή για ακριβές κεντράρισμα */
    top: 50%;
    transform: translateY(-50%);
    width: 16px;  /* Λίγο μεγαλύτερο bullet */
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    
    font-size: 0;
    border-radius: 50%;
    margin-right: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.step-number::after {
    content: '';
    position: absolute;
    width: 8px; /* Μεγαλύτερο ring */
    height: 8px;
    border-radius: 50%;
    border: 8px solid transparent;
    transition: all 0.3s ease;
}

.step-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tutorial-step:hover .step-number::before {
    opacity: 1;
}

.tutorial-step:hover .step-number {
    background: #6366f1;
    transform: scale(1.1); /* Ελαφρύ scale effect στο hover */
}

.tutorial-step:hover .step-number::after {
    border-color: #6366f1;
    opacity: 0.2;
    transform: scale(1.1);
}

.tutorial-step.active .step-number {
    background: #6366f1;
}

.tutorial-step.active .step-number::after {
    border-color: #6366f1;
    opacity: 0.2;
}

.step-number.completed {
    background: linear-gradient(135deg, #10b981, #059669);
}

.tutorial-step.completed .step-number {
    background: #6366f1;
}

.tutorial-step.completed .step-number::before {
    content: '✓';
    color: white;
    font-size: 0.9rem; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-arrow {
    width: 24px;  
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;  
    color: #CBD5E1;  
    font-size: 0.875rem;
    margin-left: auto;
    transition: all 0.3s ease;
}

.tutorial-step:hover .step-arrow {
    color: #6366F1; 
    transform: translateX(2px);
}

/*Βήματα εκτελεσης των blocks*/
.step-container {
    counter-reset: step-counter;
}

.instruction-step {
    position: relative;
    margin: 16px 0;
    padding: 12px 12px 12px 35px;
    background: #f8f9fa;
    border-left: 4px solid #6366f1;
    border-radius: 0 8px 8px 0;
    line-height: 1.5;
}

.instruction-step::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

/* Μεσα στο tutorial η αντιστοιχη λεξη κατηγοριας πχ TEXT */
.category-logic { color: #4CAF50; font-weight: 500; padding: 0 4px; }
.category-loops { color: #2196F3; font-weight: 500; padding: 0 4px; }
.category-math { color: #9C27B0; font-weight: 500; padding: 0 4px; }
.category-text { color: #FF9800; font-weight: 500; padding: 0 4px; }
.category-variables { color: #E91E63; font-weight: 500; padding: 0 4px; }
.category-lists { color: #FF5722; font-weight: 500; padding: 0 4px; }
.category-functions { color: #795548; font-weight: 500; padding: 0 4px; }


/* Εντολές Blockly */
.block-command {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    font-family: 'Fira Code', monospace;
    border-radius: 4px;
    color: white;
    margin: 0 2px;
    font-size: 0.9rem;
}

/* Μεσα στο tutorial η αντιστοιχη λεξη κατηγοριας πχ PRINT */
.cmd-logic { background: #4CAF50; }     
.cmd-loops { background: #2196F3; }     
.cmd-math { background: #9C27B0; }      
.cmd-text { background: #FF9800; }       
.cmd-variables { background: #E91E63; }  
.cmd-lists { background: #FF5722; }
.cmd-functions { background: #795548; }


/* Blockly 12 Styling κατηγορίων */


/* Βασικό container του toolbox */
.blocklyToolbox {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.15);
    border-right: none;
    padding: 16px 8px;
    transition: all 0.3s ease;
}




/* Το βασικό κουτάκι της καθε κατηγορίας */
.blocklyToolboxCategory {
    position: relative;
    height: 40px !important;
    margin: 8px 0 !important;
    padding: 0 8px !important;
    padding-left: 45px !important;
    border-radius: 12px;
    display: flex !important;
    align-items: center;
    transition: all 0.2s ease-in-out;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    
}

/* Hover effect */
.blocklyToolboxCategory:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Στυλ για τις ετικέτες κατηγοριών */
.blocklyToolboxCategoryLabel {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding-left: 8px;
    color: #333;
}


/* Κοινός κώδικας για τα εικονίδια κατηγοριών */
.blocklyToolboxCategory::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    z-index: 100;
}

/* Logic κατηγορία */
#blockly-1 .blocklyToolboxCategory::before,
.blocklyToolboxCategoryContainer:nth-child(1) .blocklyToolboxCategory::before {
    content: "\f121";
    color: #4CAF50;
}

/* Loops κατηγορία */
#blockly-2 .blocklyToolboxCategory::before,
.blocklyToolboxCategoryContainer:nth-child(2) .blocklyToolboxCategory::before {
    content: "\f2f1";
    color: #2196F3;
}

/* Math κατηγορία */
#blockly-3 .blocklyToolboxCategory::before,
.blocklyToolboxCategoryContainer:nth-child(3) .blocklyToolboxCategory::before {
    content: "\f1ec";
    color: #9C27B0;
}

/* Text κατηγορία */
#blockly-4 .blocklyToolboxCategory::before,
.blocklyToolboxCategoryContainer:nth-child(4) .blocklyToolboxCategory::before {
    content: "\f031";
    color: #FF9800;
}

/* Variables κατηγορία */
#blockly-5 .blocklyToolboxCategory::before,
.blocklyToolboxCategoryContainer:nth-child(5) .blocklyToolboxCategory::before {
    content: "\f5fd";
    color: #E91E63;
}

/* Lists κατηγορία */
#blockly-6 .blocklyToolboxCategory::before,
.blocklyToolboxCategoryContainer:nth-child(6) .blocklyToolboxCategory::before {
    content: "\f0ca";
    color: #FF5722;
}

/* Functions κατηγορία */
#blockly-7 .blocklyToolboxCategory::before,
.blocklyToolboxCategoryContainer:nth-child(7) .blocklyToolboxCategory::before {
    content: "\f085"; 
    color: #795548;
}

.procedure_category {
    color: #795548;
}


/* Χρωμα κειμενου επιλεγμενης κατηγοριας */
.blocklyToolboxSelected .blocklyToolboxCategoryLabel {
    color: #333 !important;
}

/* Στυλ για τις επιλεγμένες κατηγορίες */
.blocklyToolboxSelected {
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: selectCategory 0.3s ease-in-out;
    color: #333 !important;
}

/* Υπόλοιπα στυλ δεν χρειάζονται important */
.blocklyFlyout {
    background-color: #f9f9f9;
    border-right: 1px solid #e0e0e0;
}

.blocklyToolboxDiv::-webkit-scrollbar,
.blocklyToolbox::-webkit-scrollbar {
    width: 8px;
}

.blocklyToolboxDiv::-webkit-scrollbar-track,
.blocklyToolbox::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 4px;
}

.blocklyToolboxDiv::-webkit-scrollbar-thumb,
.blocklyToolbox::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
    border: 2px solid var(--background-color);
}

.blocklyToolboxDiv::-webkit-scrollbar-thumb:hover,
.blocklyToolbox::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-dark);
}

.blocklyToolboxContents {
    padding: 8px 0;
}

.blocklyToolboxCategoryGroup {
    padding: 4px 0;
}

.blocklyTreeRowContentContainer {
    display: flex;
    align-items: center;
}

@keyframes selectCategory {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}