.profile-container{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "header"
    "main";
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
}

.profile-container > .header{
  grid-area: header;
  margin-bottom: 8px;
}

.profile-page{
  grid-area: main;
  min-height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  width: 100%;
}

.profile-card{
  width: 100%;
  max-width: 520px;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  border: 1px solid #e7e7e7;
  box-sizing: border-box;
}

.profile-card h1{
  margin: 0 0 20px;
  text-align: center;
  font-size: 32px;
  line-height: 1.1;
  color: #333;
}

.profile-avatar-block{
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.profile-avatar-block img{
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
  border: 3px solid #f0f0f0;
}

.profile-info{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.profile-row{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.profile-label{
  font-weight: 700;
}

.profile-edit-block{
  margin-bottom: 24px;
}

.profile-edit-label{
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

#photoUrlInput{
  width: 100%;
  box-sizing: border-box;
  height: 46px;
  padding: 0 12px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  margin-bottom: 12px;
  font: inherit;
  background: #fff;
}

#photoUrlInput:focus{
  outline: none;
  border-color: #999;
}

.profile-edit-actions{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-edit-actions button{
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  background: #333;
  color: #fff;
  box-sizing: border-box;
}

.profile-edit-actions button:hover{
  background: #444;
}

.profile-msg{
  margin-top: 12px;
  min-height: 20px;
  color: #666;
}

.profile-actions{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-link{
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f2f2f2;
  color: #1f1f1f;
  text-align: center;
  font-weight: 600;
}

.profile-link:hover{
  background: #e9e9e9;
}

.profile-logout{
  border: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #b93838;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.profile-logout:hover{
  background: #a32f2f;
}

@media (max-width: 600px){
  .profile-container{
    padding: 14px;
  }

  .profile-card{
    padding: 18px;
    border-radius: 14px;
  }

  .profile-card h1{
    font-size: 28px;
  }

  .profile-row{
    flex-direction: column;
    gap: 6px;
  }
}

.profile-container{
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "header"
    "main";
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
}

.profile-container > .header{
  grid-area: header;
  margin-bottom: 8px;
}

.profile-page{
  grid-area: main;
  min-height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  padding: 0;
  margin: 0;
}

.profile-card{
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  box-sizing: border-box;
}