html { 
    height: 100%; 
    background: url('background.jpg') no-repeat center center fixed; 
    -webkit-background-size: cover; 
    background-size: cover; 
}
body { 
    width: 100%; 
    height: 100%; 
    margin: 0; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; 
    background: transparent; 
    overflow: hidden; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}
#cloud-container { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 55%; 
    pointer-events: none; 
    z-index: 1; 
}
.cloud { 
    position: absolute; 
    background-image: url('cloud.png'); 
    background-size: contain; 
    background-repeat: no-repeat; 
    opacity: 0; 
}
.content-block { 
    position: relative; 
    width: 95%; 
    height: 90vh; 
    max-width: 800px; 
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(12px); 
    border-radius: 20px; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); 
    display: flex; 
    flex-direction: column; 
    padding: 20px; 
    box-sizing: border-box; 
    color: white; 
    z-index: 2; 
}
.fixed-button { 
    position: fixed; 
    z-index: 999; 
    top: 20px; 
    width: 44px; 
    height: 44px; 
    background-color: #34495e; 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    text-decoration: none; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
    transition: transform 0.2s ease, background-color 0.2s ease; 
    cursor: pointer; 
    border: none; 
    color: white; 
    font-size: 24px; 
    font-weight: bold; 
}
.fixed-button:hover { 
    transform: scale(1.1); 
    background-color: #4a627c; 
}
.back-button { left: 20px; }
.back-button::before { 
    content: ''; 
    width: 10px; 
    height: 10px; 
    border-left: 3px solid white; 
    border-bottom: 3px solid white; 
    transform: translateX(2px) rotate(45deg); 
}
#help-button { right: 20px; }
#oferta-button { right: 20px; top: 74px; }
#oferta-button img { width: 55%; height: 55%; object-fit: contain; }

.info-header-block { 
    background-color: rgba(44, 62, 80, 0.8); 
    padding: 15px; 
    border-radius: 8px; 
    text-align: center; 
    color: #ecf0f1; 
    font-size: 15px; 
    line-height: 1.5; 
}
.info-header-block p { margin: 0; font-weight: 500; }
.info-header-block strong { color: #f1c40f; font-size: 16px; }

.list-separator { 
    width: 100%; 
    height: 1px; 
    background-color: rgba(255, 255, 255, 0.3); 
    margin: 15px 0; 
}

.groups-list-container { 
    width: 100%; 
    height: 100%; 
    overflow-y: auto; 
    padding-right: 10px; 
}
.groups-list-container::-webkit-scrollbar { width: 8px; } 
.groups-list-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; } 
.groups-list-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.5); border-radius: 4px; }

.group-item { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    background-color: #34495e; 
    border-radius: 8px; 
    padding: 10px 15px; 
    margin-bottom: 15px; 
    min-height: 80px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
    transition: background 0.3s ease, filter 0.2s ease, opacity 0.3s ease, transform 0.3s ease; 
}
.group-item:hover { filter: brightness(1.15); }
.group-item.applied-to { background: linear-gradient(rgba(231, 76, 60, 0.3), rgba(231, 76, 60, 0.3)), #34495e; }

.teacher-avatar { 
    width: 70px; 
    height: 70px; 
    border-radius: 50%; 
    object-fit: cover; 
    background-color: #4a627c; 
    flex-shrink: 0; 
}
.group-details { 
    flex-grow: 1; 
    font-size: 14px; 
    line-height: 1.4; 
}
.group-details h2 { font-size: 16px; margin: 0 0 4px 0; color: #f1c40f; }
.group-details .schedule-time { font-weight: bold; }
.group-item-bottom { display: flex; flex-direction: column; align-items: flex-start; flex-shrink: 0; }
.actions { display: flex; flex-direction: column; } 
.actions button:not(:last-child) { margin-bottom: 5px; }
.spots-left { 
    margin-bottom: 8px; 
    padding: 2px 8px; 
    background-color: #2ecc71; 
    border-radius: 4px; 
    display: inline-block; 
    font-size: 12px; 
    font-weight: bold; 
}
.apply-button, .map-button { 
    color: white; 
    border: none; 
    padding: 8px 16px; 
    min-width: 100px; 
    border-radius: 5px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: background-color 0.2s ease; 
}
.apply-button { background-color: #e67e22; } 
.apply-button:hover { background-color: #d35400; }
.map-button { background-color: #3498db; } 
.map-button:hover { background-color: #2980b9; }

.no-groups-message { text-align: center; padding: 20px; font-size: 16px; opacity: 0.8; }

@media (max-width: 768px) { 
    .group-item { flex-wrap: wrap; row-gap: 10px; } 
    .group-details { flex-grow: 1; flex-basis: 0; } 
    .group-item-bottom { flex-basis: 100%; flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px; } 
    .spots-left { margin-bottom: 0; } 
    .actions { flex-direction: row; gap: 8px; } 
    .actions button:not(:last-child) { margin-bottom: 0; } 
    .apply-button, .map-button { padding: 8px 12px; min-width: auto; } 
}

.modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.7); 
    display: none; 
    justify-content: center; 
    align-items: center; 
    z-index: 1000; 
    padding: 15px; 
    box-sizing: border-box; 
}
#application-form, .help-modal-content { 
    background-color: #34495e; 
    padding: 30px; 
    border-radius: 10px; 
    width: 400px; 
    max-width: 100%; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    color: white; 
}
#application-form { 
    display: flex; 
    flex-direction: column; 
    max-height: 85vh; 
    overflow-y: auto; 
    padding-right: 15px; 
}
#application-form::-webkit-scrollbar { width: 8px; }
#application-form::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; }
#application-form::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.5); border-radius: 4px; }

#application-form h3, .help-modal-content h3 { margin-top: 0; text-align: center; }
.form-group { margin-bottom: 15px; } 
.form-group label { display: block; margin-bottom: 5px; } 
.form-group input { 
    width: 100%; 
    padding: 10px; 
    box-sizing: border-box; 
    border-radius: 5px; 
    border: 1px solid #4a627c; 
    background-color: #2c3e50; 
    color: white; 
    font-size: 16px; 
}
.form-actions { display: flex; justify-content: space-between; margin-top: 20px; } 
.form-actions button { width: 48%; padding: 12px; border: none; border-radius: 5px; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.2s ease; }
#submit-btn { background-color: #27ae60; color: white; } 
#submit-btn:hover { background-color: #2ecc71; }
#cancel-btn { background-color: #c0392b; color: white; } 
#cancel-btn:hover { background-color: #e74c3c; }

.help-modal-content p { line-height: 1.6; margin-top: 0; } 
#close-help-btn { 
    width: 100%; 
    padding: 12px; 
    border: none; 
    border-radius: 5px; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    margin-top: 20px; 
    background-color: #3498db; 
    color: white; 
} 
#close-help-btn:hover { background-color: #2980b9; }

#map-modal-content { 
    position: relative; 
    padding: 5px; 
    width: 90vw; 
    height: 85vh; 
    max-width: 900px; 
    max-height: 700px; 
    background-color: #34495e; 
}
#map-container { width: 100%; height: 100%; border-radius: 8px; }
#close-map-btn { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    z-index: 10; 
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    background: rgba(0,0,0,0.5); 
    color: white; 
    border: none; 
    font-size: 20px; 
    line-height: 30px; 
    text-align: center; 
    cursor: pointer; 
}

.filter-controls { display: flex; justify-content: center; gap: 15px; margin-bottom: 15px; }
.filter-btn { 
    padding: 10px 20px; 
    border: 2px solid rgba(255, 255, 255, 0.5); 
    background-color: transparent; 
    color: white; 
    font-size: 16px; 
    font-weight: 500; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
}
.filter-btn:hover { background-color: rgba(255, 255, 255, 0.2); border-color: white; }
.filter-btn.active { background-color: #e67e22; border-color: #e67e22; font-weight: bold; }
.filter-no-results { display: none; text-align: center; padding: 20px; font-size: 16px; opacity: 0.8; }

.group-info-in-modal { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-top: 15px; 
    padding: 10px; 
    background-color: rgba(0, 0, 0, 0.2); 
    border-radius: 8px; 
}
.group-info-in-modal .teacher-avatar { width: 80px; height: 80px; }
.group-info-in-modal .group-details { font-size: 15px; }

.autofill-panel { margin-bottom: 15px; }
.autofill-panel p { margin: 0 0 10px; font-size: 14px; text-align: center; }
.autofill-profiles { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
    padding-bottom: 10px; 
    scrollbar-width: thin; 
    scrollbar-color: #e67e22 rgba(0,0,0,0.3); 
}
.autofill-profiles::-webkit-scrollbar { height: 6px; }
.autofill-profiles::-webkit-scrollbar-thumb { background: #e67e22; border-radius: 3px; }
.autofill-profile-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.autofill-profile-btn:hover { background-color: rgba(230, 126, 34, 0.8); border-color: #e67e22; }
.autofill-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }