.success-message {
    background-color: #d4edda; 
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.competitions-list {
    color: #fff;
    list-style-type: none;
    padding: 0;
}

.competitions-list li {
    margin-bottom: 20px;
}

.competitions-list li a {
    color: #fff;
}

.action-button {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    background-color: #84BE38 !important;
    color: #fff !important;
    transition: background-color 0.3s ease;
}

.join-button {
    background-color: #84BE38  !important;
}

.join-button:hover {
    background-color: #0056b3 !important;
}

.leave-button {
    background-color: #dc3545 !important; 
}

.leave-button:hover {
    background-color: #a71d2a !important;
}

.success-message {
    color: #28a745;
    font-weight: bold;
    margin: 10px 0;
}

.normalkost-menu {
    margin-top: 45px;
    background-color: #f8f9fa; 
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #ccc;
    box-shadow: 
    0 4px 8px rgba(100, 100, 200, 0.1), 
    0 8px 16px rgba(50, 50, 150, 0.2),
    0 12px 24px rgba(20, 20, 100, 0.3);
    transform: translateY(-100%);
    transform: translateX(100%);  
    transition: all 0.5s ease-out; 
    animation: slideIn 1.5s ease-out forwards; 
}

/* Keyframe-Animation */
@keyframes slideIn {
    0% {
        left: 0px; 
    }
    60% {
        left: 50%; /* Schnell zur Mitte */
        transform: translateX(0%) translateY(-10%);
    }
    100% {
        left: 50%; /* Leichtes Verlangsamen bis zur Mitte */
        transform: translateX(0%) translateY(-10%);
    }
}

.normalkost-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px; 
}

.normalkost-menu-item a {
    display: block;
    color: #84BE38; 
    text-decoration: none;
    font-size: 18px; 
    font-weight: bold;
    padding: 10px 15px;
    border: 2px solid transparent; 
    border-radius: 5px;
    transition: all 0.3s ease; 
}

.normalkost-menu-item a:hover {
    background-color: rgb(132, 190, 56, 0.5);
    color: #fff; 
    border-color: #fff; 
    text-decoration: none;
}

.normalkost-menu-item a:active {
    transform: scale(0.98); 
}

.normalkost-background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    z-index: -1; 
    pointer-events: none; 
}

.normalkost-menu-list {
    position: relative;
    z-index: 1; 
    list-style: none;
    padding: 0;
    margin: 0;
}

.normalkost-menu-item {
    margin: 10px 0;
}

.normalkost-menu-item a {
    text-decoration: none;
    font-size: 28px;
    color: white;
    text-shadow: 
    1px 1px 0 black, 
    -1px -1px 0 black, 
    -1px 1px 0 black, 
    1px -1px 0 black,
    0px 1px 0 black,
    0px -1px 0 black,
    1px 0px 0 black,
    -1px 0px 0 black,
    3px 3px 5px rgba(0, 0, 0, 0.5);
}

.back-link {
    margin-top: 20px;
    color: #fff !important;
    text-decoration: none;
    font-size: 16px;
    display: inline-block;
    transition: color 0.3s;
}

.back-link:hover {
    color: #005177;
    text-decoration: underline;
}

.normalkost-competition-form {
    background-color: rgb(248, 249, 250, 0.1);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #ccc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
    max-width: 600px;
    margin: 20px auto;
}

.normalkost-competition-form h2 {
    text-align: center;
    color: #fff; 
    margin-bottom: 20px;
}

.competition-form .form-group {
    margin-bottom: 15px;
}

.competition-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #495057;
}

.competition-form input, .competition-form textarea, .competition-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

.competition-form textarea {
    resize: vertical;
    min-height: 100px;
}

.competition-form .submit-button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.competition-form .submit-button:hover {
    background-color: #0056b3;
}

.form-message {
    background-color: #d4edda; 
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.competitions-list, .goals-list {
    list-style: none;
    padding: 0;
}

.goals-list li {
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.personal-goals-list {
    color: #fff;
}

.submit-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
}

.submit-button:hover {
    background-color: #0056b3;
}

/* Allgemeine Stile für das Formular */
.personal-goal-form, .competition-selection-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgb(249, 249, 249, 0.1);
    border-radius: 8px;
    border: 2px solid #ccc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.personal-goal-form h3, .competition-selection-form h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 20px;
}

.personal-goal-form .form-group, .competition-selection-form .form-group {
    margin-bottom: 15px;
}

.personal-goal-form label, .competition-selection-form label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.personal-goal-form .input-field, .competition-selection-form .form-control {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    margin-top: 5px;
}

.personal-goal-form .input-field:focus, .competition-selection-form .form-control:focus {
    border-color: #4CAF50;
    outline: none;
}

.personal-goal-form textarea, .competition-selection-form select {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    margin-top: 5px;
}

.personal-goal-form textarea {
    height: 100px;
}

.personal-goal-form select {
    height: 40px;
}

.personal-goal-form button, .competition-selection-form button {
    background-color: #4CAF50;
    color: #fff;
    padding: 12px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
}

.personal-goal-form button:hover, .competition-selection-form button:hover {
    background-color: #45a049;
}

.btn-delete {
    margin-top: 10px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
    background-color: #dc3545 !important;
}

.btn-delete:hover {
    background-color: #0056b3 !important;
}

.success-message, .error-message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.competition-link {
    font-size: 1.1em;
    color: #fff !important;
    text-decoration: none;
}

.competition-link:hover {
    text-decoration: underline;
}

/* Formulareingabefelder */
input[type="text"], input[type="number"], textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    margin-top: 5px;
    margin-bottom: 15px;
}

input[type="text"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
    border-color: #4CAF50;
    outline: none;
}

/* Spezifische Anpassung für das "Intervall"-Dropdown */
.personal-goal-form select[name="intervall"] {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    margin-top: 5px;
}


.competition-selection {
    margin-bottom: 20px;
}

#normalkost-container {
    display: flex;
    gap: 20px;
}

.food-selection-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: 600px;
}

.food-container, .selected-container {
    border: 2px solid #ccc;
    padding: 10px;
    width: 45%;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    max-height: 600px; 
    overflow-y: auto; 
    overflow-x: hidden; 
}

.food-container h4, .selected-container h4 {
    margin-bottom: 10px;
}

@media screen and (max-width: 1024px) { 
    .selected-container {
        .food-icon {
            display: none !important; 
        }
    }

    .selected-container {
        .raw-food-item, .healthy-drink-item, .open-modal-btn, .toggle-note-btn, #help-link {
            display: none !important;
        }
    }
   
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .food-container, .selected-container {
        margin-left: 10px; 
    }

    .delete-item {
        margin-left: 0px !important;
    }
    
    .selected-container .food-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .food-icon {
        display: none !important; 
    }

    .food-name {
        font-size: 14px; 
    }

    #total-points {
        width: 15%;
    }

    .total-points-container {
        display: grid !important;
        justify-content: normal !important;
        text-align: justify !important;
    }

    .weight-input {
        text-align: center !important;
        margin-left: 0 !important;
    }

    .energy-points {
        display: none !important;
    }     

    #competition-data-container, 
    #current-date-de, 
    .close-hint, 
    .competition-selection-form, 
    .container-title, 
    .weight-input, 
    #sound-control, 
    .open-modal-btn,
    #help-link,
    .total-points,
    .back-link,
    .normalkost-menu-item,
    .settings-icon,
    #playAudio,
    .white,
    .competitions-list,
    .personal-goals-list,
    .category-title,
    .banner,
    .red-banner,
    input[type="text"], input[type="number"], input[type="date"], textarea, select {
        font-size: 12px !important;
    }

    .raw-food-item, .healthy-drink-item, .open-modal-btn, #help-link {
        display: none !important;
    }
}


@media screen and (max-width: 480px) {
    .food-name, 
    #competition-data-container, 
    #current-date-de, 
    .close-hint, 
    .competition-selection-form, 
    .container-title, 
    .weight-input, 
    #sound-control, 
    .open-modal-btn,
    #help-link,
    .total-points,
    .back-link,
    .normalkost-menu-item,
    .settings-icon,
    #playAudio,
    .white,
    .competitions-list,
    .personal-goals-list,
    .category-title,
    .banner,
    .red-banner,
    input[type="text"], input[type="number"], input[type="date"], textarea, select {
        font-size: 12px !important; 
    }

    .weight-input {
        text-align: center !important;
        margin-left: 0 !important;
    }

    .delete-item {
        margin-left: 0px !important;
    }

    .food-icon {
        display: none important; 
    }

    #total-points {
        width: 15%;
    }

    .total-points-container {
        display: grid !important;
        justify-content: normal !important;
        text-align: justify !important;
    }

    .energy-points {
        display: none !important;
    }

    .food-container, .selected-container {
        padding: 8px; 
    }

    .raw-food-item, .healthy-drink-item, .open-modal-btn, #help-link  {
        display: none !important;
    }
}

.raw-food-item   {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    margin-left: auto; 

    @media screen and (max-width: 820px) { 
        display: none !important;
    }
}

.healthy-drink-item {
    width: 30px;
    height: 30px;
}

.weight-input {
    margin-left: auto; 
    text-align: right; 
    max-height: 30px !important;
}

.food-weight {
    width: 50px !important;
    padding: 5px !important;
    margin-top: -2px !important;
}

.container-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.food-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.selected-container {
    .food-name {
        padding-right: 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
    }
}

.food-info .food-category {
    font-size: 14px;
}

.food-info {
    display: flex;
    flex-direction: column;
}

.food-item:hover {
    background-color: #f0f0f0;
}

.food-item img.food-icon {
    width: 55px;
    height: 55px;
    margin-right: 10px;
    max-width: fit-content !important;

    @media screen and (max-width: 820px) { 
        display: none;
    }
}

.food-item span {
    font-size: 12px;
}

.total-points-container {
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    gap: 10px;
    margin-top: 10px;
    text-align: right;
}

.total-points-container input {
    width: 60px;
    font-size: 16px;
    font-weight: bold;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #ccc !important;
    text-align: end;
}

.date-selection {
    text-align: right;
}

.selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between; 
   
}

.selected-item .food-icon {
    width: 55px;
    height: 55px;
    margin-right: 10px;
}

.energy-points, .max_amount {
    flex: 1; 
    text-align: left;
    font-size: 10px !important; 
}

.selected-item .food-amount {
    width: 35px;
    height: 30px !important;
    text-align: center; 
    margin: 0 5px; 
}

.delete-item {
    width: 20px;
    height: 20px;
    margin-left: 10px;
    margin-right: 10px;
}

.start-date-button {
    width: 40px;    
    height: 30px;   
    padding: 0;     
    margin: 2px;   
    border-radius: 5px; 
}

.date-button {
    width: 30px;    
    height: 30px;   
    padding: 0;     
    margin: 2px;   
    border-radius: 5px; 
}

/* Webkit (Chrome, Safari, Edge) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

#complete-week {
    margin-top: -7px;
    padding: 10px 16px; 
    border-radius: 5px; 
    cursor: pointer;
}

#complete-week:active {
    box-shadow: 0 2px #3e8e41; 
    transform: translateY(2px); 
}

#complete-week:hover, #complete-competition:hover, .date-button:hover, .settings-icon:hover, #playAudio:hover {
    background: linear-gradient(to bottom, #6fdc6f, #5cb85c); 
}


#complete-competition {
    margin-top: -7px;
    padding: 10px 16px; 
    border-radius: 5px; 
    cursor: pointer; 
}

#selected-container.disabled, #food-container.disabled {
    opacity: 0.8;
    pointer-events: none; 
}

#competition-data-container {
    text-align: center;
    font-weight: bold;
}

.leaderboard-container { margin-top: 20px; display:flex; justify-content: center; }
.leaderboard-list { list-style: none; padding: 0; min-width: 300px; max-width: 800px; }
.leaderboard-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #ddd; }
.user-name { color: #fff; font-weight: bold; }
.user-points { color: #fff; }

.leaderboard-list .first-place {
    background-color: gold;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
}

.leaderboard-list .second-place {
    background-color: silver;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
}

.leaderboard-list .third-place {
    background-color: brown;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
}

.food-item {
    position: relative;
}

#weekly-target {
    width: 20%;
}

#sound-control {
    margin-top: 10px;
}

.modal {
    display: none; 
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 9999 !important;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 860px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 14px;
}

.modal ul {
    list-style-type: none;
    padding: 0;
}

.modal li {
    margin: 10px 0;
}

.modal .recipe-thumbnail img {
    max-width: 100px;
    height: auto;
    margin-top: 10px;
}

.close-help-modal, .close-recept-modal, .close-settings-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-help-modal, .close-recept-modal:hover,
.close-help-modal, .close-recept-modal:focus {
    color: #000;
    text-decoration: none;
}

.open-modal-btn {
    margin-top: 10px;
    border-radius: 5px;
}

.help-link-container {
    margin-bottom: 10px;
}

.white {
    color: #fff !important;
}

#playAudio.playing {
    background-color: green;
    color: white;
}

#playAudio.paused {
    background-color: red;
    color: white;
}

#settingsModal {
    z-index: 100;
}

.preview-container {
    text-align: center;
    margin-top: 10px;
}

#imagePreview {
    border: 1px solid #ddd;
    border-radius: 5px;
    max-width: 30% !important;
    height: auto;
}

.food-category {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.category-header {
    background-color: #f5f5f5;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.category-header:hover {
    background-color: #eaeaea;
}

.category-items {
    padding: 0 10px;
    background-color: #fff;

    max-height: 0;
    overflow: hidden;
   transition: max-height 0.8s ease, padding 0.8s ease;
}

/* Wenn offen */
.category-items.open {
    max-height: 2000px; /* groß genug für Inhalt */
    padding: 10px;
}


.food-item {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.food-item:last-child {
    border-bottom: none;
}

.banner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; 
    background-color: green; 
    color: white; 
    text-align: center; 
    padding: 10px 0; 
    font-weight: bold; 
    animation: fadeIn 2s ease-out forwards; /* Animation für das Einfaden */
}

.red-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; 
    background-color: #dc3545; 
    color: white; 
    text-align: center; 
    padding: 10px 0; 
    font-weight: bold;
    animation: fadeIn 2s ease-out forwards; /* Animation für das Einfaden */
}

@keyframes fadeIn {
    0% {
        opacity: 0; /* Banner ist zu Beginn unsichtbar */
    }
    100% {
        opacity: 1; /* Banner wird vollständig sichtbar */
    }
}
.selected-container {
    position: relative; 
    padding-bottom: 50px; 
}

#bonus-points-text {
    font-size: 12px;
    height: auto;
    min-height: 50px;
    margin-bottom: 20px;
}


#bonus-points {
    font-size: 12px;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid green;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.amount-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    margin: 0 5px;
    background: #f0f0f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.amount-btn:hover:not(:disabled) {
    background: #ddd;
}

.amount-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.amount-btn.plus {
    color: #0b7d0b;
}

.amount-btn.minus {
    color: #b30000;
}

.date-navigation {
    display: flex;
    gap: 8px; 
    justify-content: end;
}

.nav-btn {
    background: linear-gradient(145deg, #4caf50, #2e7d32); /* grüner Farbverlauf */
    color: white;                 /* Pfeilfarbe */
    font-size: 18px;              /* Icongröße */
    width: 36px;                  /* Breite */
    height: 36px;                 /* Höhe */
    border: none;
    border-radius: 50%;           /* rund */
    cursor: pointer;
    box-shadow: 0 4px #1b5e20, 0 6px 10px rgba(0,0,0,0.2); /* 3D Effekt */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
}

.nav-btn:active {
    transform: translateY(2px); /* Beim Klicken nach unten gedrückt */
    box-shadow: 0 2px #1b5e20, 0 3px 6px rgba(0,0,0,0.2);
}

.nav-btn:hover {
    filter: brightness(1.1);
}

/* Optional: größere Buttons für doppelte Pfeile */
.double-left, .double-right {
    font-size: 16px;
}

.goals-wrapper {
    margin-top: 18px;
    margin-bottom: 18px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(3px);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.25);
}

.goals-title {
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.goals-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.goal-badge {
    display: inline-block;
    background: #2ecc71;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
    white-space: nowrap;
    margin-left: 5px;
}

.goal-badge:hover {
    background: #27ae60;
}

#competition-select-container {
    text-align: center;
    margin-top: -40px; 
}

.content-row-wrapper {
    padding: 0; 
}

.normalkost-quicklinks {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 10px 0 15px 0;
    padding: 6px 10px;
    background: rgba(0,0,0,0.6);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,255,150,0.2);
}

.quicklinks-label {
    color: #00ff99;
    font-weight: bold;
    font-size: 10px;
}

.quicklink {
    color: white;
    text-decoration: none;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(0,255,150,0.15);
    border: 1px solid rgba(0,255,150,0.6);
    transition: 0.25s ease;
}

.quicklink:hover {
    background: #00ff99;
    color: black;
    box-shadow: 0 0 12px rgba(0,255,150,0.8);
}

select[multiple] {
    min-height: 180px;
}

/* Toggle Button */
.toggle-note-btn,
.open-modal-btn,
.save-note-btn,
#complete-week,
#complete-competition {
    background: linear-gradient(135deg, #6fbf73, #4caf50);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;

    /* 3D-Effekt */
    box-shadow:
        0 3px 0 #3e8e41,       /* harte Kante unten */
        0 6px 10px rgba(0,0,0,0.15); /* weicher Schatten */

    transition:
        background 0.3s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.toggle-note-btn:hover,
.save-note-btn:hover,
.open-modal-btn:hover,
#complete-week:hover,
#complete-competition:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 0 #3e8e41,
        0 8px 14px rgba(0,0,0,0.2);
}

.toggle-note-btn:active,
.save-note-btn:active,
.open-modal-btn:active,
#complete-week:active,
#complete-competition:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 #3e8e41,
        0 3px 6px rgba(0,0,0,0.15);
}

/* Note Container (Accordion) */
.note-container {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 1.5s ease, opacity 1.4s ease;
    margin-top: 10px;
}

/* sichtbar */
.note-container.open {
    max-height: 400px; 
    opacity: 1;
}

/* Textarea */
.note-textarea {
    width: 50%;
    max-width: 600px;   /* optional, für große Screens */
    min-width: 280px;   /* optional, für Mobile */
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
    font-size: 14px;
}

@media (max-width: 768px) {
    .note-textarea {
        width: 100%;
    }
}

/* Actions */
.note-actions {
    margin-top: -8px;
    text-align: left;
}


.nk-stats {
    display: flex;
    flex-direction: column;
    margin-left: auto;
    margin-top: -50px;
    gap: 10px;
    align-items: flex-end;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    max-width: 320px;
}

.nk-stat {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
    font-size: 15px;
}

.nk-stat .label {
    color: #fff
   
}

.nk-stat .value {
    font-weight: 700;
    font-size: 18px;
}

.nk-stat.highlight .value {
    font-size: 26px;
    color: #9fffd0;
}

.daily-goal-chips {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 18px 0 -6px; 
    opacity: 0;              
    animation: fadeIn 2s ease forwards; 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.goal-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 10px;
    color: #fff;
    font-size: 11px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.goal-chip .chip-icon {
    font-size: 16px;
    line-height: 1;
}

.chip-icon {
    width: 32px;      /* gleiche Größe wie die anderen Chips */
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chip-icon .chip-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* sorgt dafür, dass das Bild nicht verzerrt wird */
}

.goal-chip .chip-text {
    display: flex;
    flex-direction: column;   
    align-items: flex-start;
    line-height: 1.1;
}

.goal-chip .chip-name {
    font-weight: 600;
    font-size: 11px;
}

.goal-chip .chip-status {
    font-size: 10px;
    opacity: 0.8;
}


.goal-chip.done {
    background: rgba(60, 160, 80, 0.35);
}

.goal-chip.partial {
    background: rgba(220, 170, 60, 0.35);
}

.goal-chip.missing .chip-icon {
    animation: wiggle 1.6s ease-in-out infinite, pulse-border 1.6s ease-in-out infinite;
    border: 2px solid red; 
    border-radius: 50%;    
}


@keyframes wiggle {
    0%, 85% { transform: rotate(0deg); }
    90% { transform: rotate(-10deg); }
    95% { transform: rotate(10deg); }
    100% { transform: rotate(0deg); }
}


@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,0,0,0.7); }
    50% { box-shadow: 0 0 10px 5px rgba(255,0,0,0.9); }
}


/* ===== Template UI ===== */
.template-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.template-box {
    margin: 15px 0 10px;
    padding: 5px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    max-width: 550px;
}

.template-box h3 {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.template-save-row,
.template-load-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.template-save-row + .template-load-row {
    margin-top: 14px;
}

/* Inputs und Selects */
.template-box input[type="text"],
.template-box select {
    flex: 1 1 220px;
    max-width: 260px;
    min-width: 180px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.92);
    color: #222;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.template-box input[type="text"]::placeholder {
    color: #777;
}

.template-box input[type="text"]:focus,
.template-box select:focus {
    border-color: #7ed957;
    box-shadow: 0 0 0 3px rgba(126, 217, 87, 0.18);
    background: #fff;
}

/* Buttons */
.template-box button {
    height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.94rem;
    font-weight: 600;
    transition: all 0.22s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
}

/* Speichern */
#save-template-btn {
    margin-bottom: 10px;
    background: linear-gradient(135deg, #43c463, #2e9f4d);
    color: #fff;
}

#save-template-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(46, 159, 77, 0.28);
    filter: brightness(1.04);
}

/* Laden */
#load-template-btn {
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffb347, #ff8c42);
    color: #fff;
}

#load-template-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(255, 140, 66, 0.28);
    filter: brightness(1.04);
}

/* Active state */
.template-box button:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0,0,0,0.16);
}

/* Kleine Beschriftung optional */
.template-box .template-note {
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.78);
}

/* Responsive */
@media (max-width: 640px) {
    .template-box {
        max-width: 100%;
        padding: 16px;
    }

    .template-save-row,
    .template-load-row {
        flex-direction: column;
        align-items: stretch;
    }

    .template-box input[type="text"],
    .template-box select,
    .template-box button {
        max-width: 100%;
        width: 100%;
    }
}

/* Header klickbar machen */
.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    padding: 10px 4px;
    user-select: none;
}

/* Hover Effekt */
.template-header:hover {
    opacity: 0.85;
}

/* Pfeil */
.template-toggle-icon {
    transition: transform 0.25s ease;
}

/* Drehung bei offen */
.template-box.open .template-toggle-icon {
    transform: rotate(180deg);
}

/* Content Animation */
.template-content {
    font-size: 0.7rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Wenn offen */
.template-box.open .template-content {
    max-height: 350px; 
    opacity: 1;
    margin-top: 10px;
}

#load-template-btn:disabled,
#save-template-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#delete-template-btn {
    background: linear-gradient(135deg, #e35d5d, #c93c3c);
    color: #fff;
}

#delete-template-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(201, 60, 60, 0.28);
    filter: brightness(1.04);
}

#delete-template-btn:disabled,
#delete-template-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}