body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
height: 100vh;
background-color: #f4f5f7;
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
overflow: hidden;
}

.container {
max-width: 400px;
width: 100%;
background-color: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
text-align: center;
animation: fadeIn 0.5s ease-out;
margin: 20px;
}

.section {
    margin-top: 30px;
}

h2, h3 {
font-size: 28px;
font-weight: 700;
color: #333;
margin-bottom: 30px;
}

.editable {
background-color: #f9f9f9;
padding: 4px 6px;
border-radius: 10px;
border: 1px dashed transparent;
transition: border-color 0.2s;
}

.editable:focus {
outline: none;
border-color: #4e3cc1;
background-color: #f0f0ff;
}

.assignment-item {
background-color: #ffffff;
padding: 20px;
border-radius: 10px;
border: 1px solid #ddd;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
margin-bottom: 20px;
position: relative;
transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.assignment-item:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.assignment-buttons {
margin-top: 10px;
display: flex;
gap: 10px;
justify-content: center;
}

.button {
width: 35%;
background-color: #4e3cc1;
color: white;
border: none;
padding: 8px;
font-size: 14px;
font-weight: 700;
cursor: pointer;
border-radius: 10px;
transition: background 0.3s, transform 0.3s;
}

.button:hover {
background-color: #4e3cc1;
transform: scale(1.05);
}

.delete-button {
background-color: #e53935;
}

.input-container {
position: relative;
margin: 5px 0;
}

input, textarea {
width: 90%;
background: #f4f5f7;
border: 1px solid #ddd;
padding: 10px;
font-size: 14px;
margin-bottom: 15px;
border-radius: 10px;
transition: border-color 0.3s, transform 0.3s;
resize: vertical;
}

input:focus, textarea:focus {
border-color: #4e3cc1;
outline: none;
transform: scale(1.05);
}

.login-link {
margin-top: 20px;
font-size: 14px;
}

.login-link a {
color: #4e3cc1;
text-decoration: none;
}

.login-link a:hover {
text-decoration: underline;
}

.modal, #assignment-modal {
display: none;
position: fixed;
z-index: 1000;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
justify-content: center;
align-items: center;
overflow-y: auto;
}

#joinModal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
background: white;
padding: 20px;
border-radius: 10px;
text-align: center;
width: 300px;
max-width: 400px;
}

.modal-content input,
.modal-content textarea {
width: 100%;
padding: 10px;
margin-top: 10px;
border-radius: 10px;
border: 1px solid #ccc;
box-sizing: border-box;
}

.modal-content button {
margin-top: 10px;
}

.info-box {
background-color: #f0f0ff;
padding: 12px;
border-left: 4px solid #4e3cc1;
border-radius: 10px;
margin-bottom: 20px;
font-size: 14px;
width: 95%;
margin-left: auto;
margin-right: auto;
box-sizing: border-box;
}

.info-box a {
color: #4e3cc1;
text-decoration: none;
font-weight: bold;
}

.info-box a:hover {
text-decoration: underline;
}

.error-message {
color: red;
margin-top: 10px;
font-size: 14px;
}

.assignments-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}

.assignments-header h3 {
margin: 0;
}

.assignments-header button {
margin-left: 20px;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

@keyframes fadeIn {
0% { opacity: 0; transform: translateY(-20px); }
100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.course-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    width: 250px; 
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: fadeInUp 0.8s ease forwards;
    cursor: pointer;
    text-align: left;
    position: relative;
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}
.course-card strong {
    font-size: 18px;
    color: #2d3436;
    margin-bottom: 8px;
}
.course-card span {
    font-size: 14px;
    color: #636e72;
}

.cancel-button {
    background-color: #ccc !important;
    color: white !important;
}

/* Состояние hover для кнопки отмены */
.cancel-button:hover {
    transform: scale(1.05) !important;
}

#cancel-button {
    margin-left: 20px;
}