body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

h1 {
    content: "🍌 mystrplan";
    color: lightslategrey;
}
.logo {
     position: absolute;
    top: 30px;
    right: 30px;
    width: 300px;
    height: 0px;
    z-index: 0;
}
.logo::before {
    content: "mystrplan";
    font-size: 3.8rem;
    font-weight: bold;
    color:#4aa8f6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgb(255, 255, 255);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), 0 0 40px rgba(255, 0, 255, 0.2);
    border: 2px solid #4aa8f6;
    position: relative;
}

.input-area {
    margin-bottom: 20px;
    display:inline;
}

.button-area-one{
    display:block;
    padding-left:0px;
    padding-bottom: 10px;
    padding-top: 10px;
}

.button-area-two {
    padding-bottom: 10px;
    padding-top: 10px;
}

#student-list {
    height: 70px;
    width: 250px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.classroom {
    position: relative;
    align-self: center;
    width: 100%;
    height: 500px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    background-image:
        linear-gradient(to right, #ddd 1px, transparent 1px),
        linear-gradient(to bottom, #ddd 1px, transparent 1px);
    background-size: 40px 40px;
    margin-bottom: 20px;

    min-width: 100%;
    min-height: 500px;
}

.square {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 1px solid #575353;
    border-radius: 8px;
    background: rgb(255, 255, 255);
    cursor: move;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
    padding: 5px;
    box-sizing: border-box;
    touch-action: none;
}

.add-square-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #64e796;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 25px;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.distribute-btn {
    padding: 10px 20px;
    background: #4aa8f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.distribute-btn:hover {
    background: #0b7dda;
}

.align-btn {
    padding: 10px 20px;
    background: #ebb563;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
}

.align-btn:hover {
    background: #e68a00;
}

.align-btn.rows-btn {
    background: #8BC34A;
}

/* grün für „Reihen“ */
.align-btn.rows-btn:hover {
    background: #7CB342;
}

/* --------------------------------------------------
   Container für die draggable Schülernamen
   -------------------------------------------------- */
.student-list {
    margin-top: 10px;
    /* Abstand zum textarea */
    display: inline-block;
    gap: 6px;
    /* Abstand zwischen den Namen */
}


/* opt.: visuelles Feedback, wenn das Element gezogen wird */
.student-item:active {
    cursor: grabbing;
    background: #d5d5d5;
}

/* --------------------------------------------------
   Container für die draggable Schülernamen
   -------------------------------------------------- */
.student-list {
    margin-top: 10px;
    /* Abstand zum textarea */
    display: flex;
    /* Flex‑Layout, damit die Items nebeneinander liegen */
    flex-wrap: wrap;
    /* Zeilenumbruch, wenn kein Platz mehr ist */
    gap: 6px;
    /* Abstand zwischen den einzelnen Boxen */
}

/* --------------------------------------------------
   Einzelner draggable Schüler (der „Chip“)
   -------------------------------------------------- */
.student-item {
    background: #e0e0e0;
    /* helles Grau */
    display: inline-flex;
    color: #333;
    border-radius: 6px;
    /* abgerundete Ecken */
    padding: 4px 8px;
    /* Innenabstand – gibt dem Text etwas Luft */
    font-size: 0.95rem;
    cursor: grab;
    /* Hinweis, dass das Element ziehbar ist */
    user-select: none;
    /* verhindert versehentliches Markieren */
    white-space: nowrap;
    /* verhindert Zeilenumbruch im Namen */
}

/* opt.: visuelles Feedback, wenn das Element gezogen wird */
.student-item:active {
    cursor: grabbing;
    background: #d5d5d5;
}

.clear-btn {
    padding: 10px 20px;
    background: #e96d6d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
}

.clear-btn:hover {
    background: #e63200;
}

.save-btn {
    
    height: fit-content;
    padding: 10px 20px;
    background: #efefef;
    color: rgb(13, 13, 13);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    
}
.teacher{
    position: absolute;
    left: 45%;
    bottom: 6px;  
    height: 20px;
    color:#a9a9a9;
    border-radius: 8px;
    padding: 3px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    
}


.modal-dialog {
    border: none;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
}

.modal-dialog::backdrop {
    background-color: rgba(0,0,0,0.5);
}

.dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.plan-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.load-plan-btn {
    flex: 1;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

.delete-plan-btn {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}


/* Styling für Separierungs-Auswahl */
.student-item.selected-for-separation {
    background-color: #ff6b6b !important;
    color: white;
    border: 2px solid #ff4757;
}

.separate-btn {
    background-color: #ff0202;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: inherit; /* Wichtig für einheitliche Schriftgröße */
    font-family: inherit;
}

.finish-btn {
    background-color: #bf9494;
    color: white;
    animation: pulse 1.5s infinite;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: inherit; /* Wichtig für einheitliche Schriftgröße */
    font-family: inherit;
}

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

/* Hover-Effekte für klickbare Schüler-Items */
.student-item[style*="cursor: pointer"]:hover {
    background-color: #ddd;
    transform: scale(1.05);
}


.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 200px;
    padding: 4px 0;
}

.context-item {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.context-item:hover {
    background-color: #f0f0f0;
}

.context-divider {
    margin: 4px 0;
    border: none;
    border-top: 1px solid #eee;
}

/* Verhindert Standard-Kontextmenü */
.no-context-menu {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}


/* Kram fuer Touch */
.student-item {
    transition: background-color 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.student-item:active {
    transform: scale(0.98);
}

.student-item.selected-for-separation {
    background-color: #ff6b6b !important;
    color: white;
    border: 2px solid #ff4757;
    animation: pulse-selection 0.3s ease-out;
}

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

.student-item {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Ergänzung für besseres Touch Feedback */
/* Touch-Feedback für Schüler-Items */
.student-item.touch-preparing {
    background-color: #e3f2fd;
    transform: scale(1.02);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.student-item.touch-dragging {
    opacity: 0.7;
    transform: scale(1.5);
    z-index: 1000;
    pointer-events: none;
}

.drag-preview {
    background: #007bff;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    pointer-events: none;
    user-select: none;
    z-index: 9999;
    border: 2px solid rgba(255,255,255,0.3);
}

.drop-highlight {
    background-color: #28a745 !important;
    border: 3px dashed #fff !important;
    transform: scale(1.05);
    animation: drop-pulse 0.5s infinite alternate;
}

@keyframes drop-pulse {
    0% { box-shadow: 0 0 5px rgba(40, 167, 69, 0.5); }
    100% { box-shadow: 0 0 15px rgba(40, 167, 69, 0.8); }
}

@keyframes drop-success {
    0% { transform: scale(1.05); background-color: #28a745; }
    50% { transform: scale(1.15); background-color: #20c997; }
    100% { transform: scale(1); }
}

/* Verbesserte Touch-Targets */
@media (max-width: 768px) {
    .student-item {
        padding: 15px 20px;
        margin: 6px 0;
        font-size: 16px;
        min-height: 50px;
        display: flex;
        align-items: center;
        border-radius: 8px;
    }
}

.export-btn {
    padding: 10px 20px;
    background: #4aa8f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.export-btn:hover {
    background: linear-gradient(145deg, #7c3aed, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 92, 246, 0.4);
}

.export-btn::before {
    content: "";
    margin-right: 6px;
}


.theme-picker-btn {
   

   height: fit-content;
    padding: 10px 20px;
    background: #efefef;
    color: rgb(13, 13, 13);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}





/* Theme-spezifische Button-Styles */
.theme-pony .theme-picker-btn {
    background: linear-gradient(145deg, #ec4899, #d946ef);
    box-shadow: 0 4px 8px rgba(236, 72, 153, 0.3);
}

.theme-pony .theme-picker-btn:hover {
    background: linear-gradient(145deg, #d946ef, #a21caf);
}

.theme-cyber .theme-picker-btn {
    background: linear-gradient(145deg, #ff00ff, #8b00ff);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.4);
    border: 2px solid #00ffff;
}

.theme-cyber .theme-picker-btn:hover {
    background: linear-gradient(145deg, #8b00ff, #4b0082);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.6);
}



