.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(to bottom, #1e4730 0%, #1a3c2f 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 2px solid #3a6b50;
    animation: modalFadeIn 0.3s ease;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-content-sea {
    background: linear-gradient(135deg, #011338 0%, #002775 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 2px solid #4300FF;
    animation: modalFadeIn 0.3s ease;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-content-run {
    background: linear-gradient(135deg, #f2643dff 0%, #dd2b08 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(147, 1, 1, 0.4);
    border: 2px solid #C60021;
    animation: modalFadeIn 0.3s ease;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-content::-webkit-scrollbar,
.modal-content-sea::-webkit-scrollbar,
.modal-content-run::-webkit-scrollbar {
    display: none;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #3a6b50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #d4edda;
    font-family: 'Caveat', cursive;
    font-size: 2.2rem;
    font-weight: 600;
}

.modal-header-sea {
    padding: 25px 30px;
    border-bottom: 2px solid #4300FF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-sea h2 {
    color: #d4d5ed;
    font-family: 'Caveat', cursive;
    font-size: 2.2rem;
    font-weight: 600;
}


.modal-header-run {
    padding: 25px 30px;
    border-bottom: 2px solid #C60021;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-run h2 {
    color: #ede8d4;
    font-family: 'Caveat', cursive;
    font-size: 2.2rem;
    font-weight: 600;
}



.close-modal {
    color: #e8f5e9;
    font-size: 32px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal:hover {
    color: #ffccbc;
}

.modal-body {
    padding: 30px;
}

.plant-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.plant-option, .music-option {
    background: linear-gradient(180deg, #2d5a42 0%, #234735 100%);
    border: 2px solid #3a6b50;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plant-option-sea, .music-option-sea{
    background: linear-gradient(180deg, #0141a1 0%, rgb(60, 0, 227) 100%);
    border: 2px solid #0141a1;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plant-option-sea:hover {
    background: linear-gradient(180deg, rgb(87, 28, 247) 0%, #045ce1 100%);
    border-color: #0141a1;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.plant-option-run, .music-option-run{
    background: linear-gradient(180deg, #c6004c 0%, rgb(227, 144, 0) 100%);
    border: 2px solid #C60021;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plant-option-run:hover {
    background: linear-gradient(180deg, rgb(247, 189, 28) 0%, #e16404 100%);
    border-color: #ff6600ff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.plant-option.selected, .music-option.selected{
    background: linear-gradient(180deg, #2e7d4d 0%, #266d41 100%);
    border-color: #4a9a6a;
    box-shadow: 0 0 0 3px rgba(74, 154, 106, 0.3);
}

.plant-option-sea.selected, .music-option-sea.selected{
    background: linear-gradient(135deg, #1a3261 0%, #002775 100%);
    border-color: #0141a1;
    box-shadow: 0 0 0 3px rgba(74, 154, 106, 0.3);
}

.plant-option-run.selected, .music-option-run.selected {
    background: linear-gradient(180deg, rgb(247, 189, 28) 0%, #e16404 100%);
    border-color: #ff6600ff;

    box-shadow: 0 0 0 3px rgba(182, 30, 17, 0.3);
}

.plant-icon, .music-icon{
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.plant-option h3, .music-option h3 {
    color: #e8f5e9;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.plant-option p, .music-option p {
    color: #c8e6c9;
    font-size: 0.95rem;
    line-height: 1.4;
}

.plant-option-sea h3, .music-option-sea h3 {
    color: #e8f5e9;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.plant-option-sea p, .music-option-sea p {
    color: #c8e6c9;
    font-size: 0.95rem;
    line-height: 1.4;
}

.plant-option-run h3, .music-option-run h3 {
    color: #e8f5e9;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.plant-option-run p, .music-option-run p {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.4;
}

.ApplySelection{
    background: linear-gradient(135deg, #0f291c 0%, #183327 100%);
    border-radius: 12px;
    width: 100%;
    color: white;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 500;
    margin-top: 5px;
    text-align: center;
    border: 2px solid #3a6b50;
}

.ApplySelection:focus{
    background: linear-gradient(135deg, #0f291c 0%, #0e1e17 100%);
    border: 2px solid #48926a;
}

.ApplySelection-sea{
    background: linear-gradient(135deg, #0f0f29 0%, #1f1833 100%);
    border-radius: 12px;
    width: 100%;
    color: white;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 500;
    margin-top: 5px;
    text-align: center;
    border: 2px solid #3a3d6b;

}
.ApplySelection-sea:focus{
    background: linear-gradient(135deg, #110f29 0%, #120e1e 100%);
    border: 2px solid #5c4892;
}

.ApplySelection-run{
    background: linear-gradient(180deg, rgb(247, 189, 28) 0%, #e16404 100%);
    border-radius: 12px;
    width: 100%;
    color: white;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 500;
    margin-top: 5px;
    text-align: center;
    border: 2px solid #ffc800;

}
.ApplySelection-run:focus{
    background: linear-gradient(135deg, #ff512a 0%, #ff7b00 100%);
    border: 2px solid #cf7405;
}
.selected-plant-display {
    background: linear-gradient(135deg, #1e4a34 0%, #2a5a44 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid #3a6b50;
}

.selected-plant-display-sea {
    background: linear-gradient(135deg, #1a3261 0%, #002775 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #ffcc00;
    border: 2px solid #0141a1;
}

.selected-plant-display-run {
    background: linear-gradient(180deg, rgb(247, 189, 28) 0%, #e16404 100%);
    border-color: #ff6600ff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #ffcc00;
    border: 2px solid;
}

.selected-plant-display p {
    color: #e8f5e9;
    font-size: 1.3rem;
    font-weight: 500;
}

.selected-plant-display-sea p {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 500;
}

.selected-plant-display-run p {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 500;
}

.selected-plant-display-run span {
    color: #ffffff !important;
    font-size: 1.3rem;
    font-weight: 500;
}


#selectedPlant, #selectedMusic{
    color: #ffffff;
    font-weight: 600;
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
}

.customMusicUpload{
    background: linear-gradient(135deg, #0d6c3ca0 0%, #2a5a44 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid #3a6b50;
    margin-bottom: 15px;
    color: #ffffff;
}
.customMusicUpload p{
    color: lightgreen;

}

/* Анимация мигания для таймера */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@media (max-width: 1024px),
(max-height:832px) {

    .page,.page_sea,.page_run {
        padding: 20px;
    }

    .timer_title h1,.timer_title_sea h1,.timer_title_run h1{
        font-size: 2.2rem;
    }

    .timechoose,.timechoose_sea,.timechoose_run button{
        gap: 15px;
    }

    .timer_clock,.timer_clock_sea,.timer_clock_run {
        font-size: 2.7rem;
        padding: 15px 35px;
    }

    .plant_container {
        width: 250px;
        height: 250px;
    }

    .timer_time button {
        width: 65px;
        height: 65px;
    }

    .plant-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content,.modal-content-sea,.modal-content-run{
        width: 95%;
    }
}


@media (max-width: 768px),
((max-height:832px)) {

    
    
    .wrapper,.wrapper_run,.wrapper_sea {
        height: 70%;
    }

    .page,.page_sea,.page_run{
        padding: 25px;
    }

    .timer_title h1,.timer_title_sea h1,.timer_title_run h1 {
        font-size: 2.2rem;
    }

    
    
    .timechoose,.timechoose_sea,.timechoose_run {
        gap: 15px;
    }

    
    
    .timer_clock,.timer_clock_sea,.timer_clock_run {
        font-size: 2.7rem;
        padding: 15px 40px;
    }

    .plant_container {
        width: 250px;
        height: 250px;
    }

    .timer_time button {
        width: 65px;
        height: 65px;
    }

    .plant-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    
    
    .modal-content,.modal-content-sea,.modal-content-run {
        width: 88%;
    }
}

@media (max-width: 425px) {
    body {
        padding: 10px;
    }

    
    
    .page,.page_sea,.page_run {
        padding: 20px;
    }

    
    
    .timer_title h1,.timer_title_sea h1,.timer_title_run h1 {
        font-size: 2rem;
    }

    
    
    .timer_clock,.timer_clock_sea,.timer_clock_run {
        font-size: 2rem;
        padding: 8px 90px;
    }

    
    
    .timechoose button,.timechoose_sea button,.timechoose_run button {
        font-size: 1rem;
        width: 90px;
    height: 50px;
        
    }

    
    
    .plant,.plant_run,.plant_sea {
        font-size: 1rem;
        font-weight: 300;

    }

    .plant_container {
        width: 200px;
        height: 200px;
    }

    .timer_time {
        flex-wrap: wrap;
        justify-content: center;
    }

    .timer_time button {
        width: 60px;
        height: 60px;
    }

    .plant-grid {
        grid-template-columns: 1fr;
    }

    
    
    .modal-header h2,.modal-header-sea h2,.modal-header-run h2 {
        font-size: 1.8rem;
    }

    
    
    .modal-content,.modal-content-sea,.modal-content-run {
        width: 77%;
    }
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

@media (max-width: 270px) {
    body {
        padding: 10px;
    }

    .page,.page_sea,.page_run {
        padding: 20px;
    }

    .timer_title h1,.timer_title_sea h1,.timer_title_run h1 {
        font-size: 0.5rem;
    }

     .timer_clock,.timer_clock_sea,.timer_clock_run {
        font-size: 3rem;
        padding: 15px 50px;
    }

    .plant_container {
        width: 100px;
        height: 100px;
    }

    .timer_time {
        flex-wrap: wrap;
        justify-content: center;
    }

    .timer_time button {
        width: 60px;
        height: 60px;
    }

    .plant-grid {
        grid-template-columns: 1fr;
    }

    
    
    .modal-header h2,.modal-header-sea h2,.modal-header-run h2 {
        font-size: 1.8rem;
    }
}