* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.page {
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px 20px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-top h1 {
    margin-bottom: 0;
}

.change-group-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-group-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

main {
    display: grid;
    gap: 30px;
}

section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background-color: white;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group select {
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* 근황 목록 스타일 */
.updates-list {
    display: grid;
    gap: 20px;
}

.update-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.update-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.update-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.update-actions {
    display: flex;
    gap: 8px;
}

.edit-update-btn,
.delete-update-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.edit-update-btn:hover {
    background-color: #e3f2fd;
}

.delete-update-btn:hover {
    background-color: #ffebee;
}

.update-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.update-date {
    color: #888;
    font-size: 0.9rem;
}

.update-content {
    display: grid;
    gap: 15px;
}

.update-content-display {
    display: block;
}

.update-edit-form {
    margin-top: 15px;
}

.update-edit-form .form-group {
    margin-bottom: 15px;
}

.update-edit-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.update-edit-form .form-group input,
.update-edit-form .form-group select,
.update-edit-form .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}

.update-edit-form .form-group input:focus,
.update-edit-form .form-group select:focus,
.update-edit-form .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.edit-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.save-update-btn,
.cancel-edit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.save-update-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.save-update-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.cancel-edit-btn {
    background: #e0e0e0;
    color: #666;
}

.cancel-edit-btn:hover {
    background: #d0d0d0;
}

.update-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
}

.update-item-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.update-item-value {
    color: #666;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 이미지 업로드 및 미리보기 스타일 */
.form-group input[type="file"] {
    padding: 10px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-group input[type="file"]:hover {
    border-color: #667eea;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.preview-image-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.remove-image-btn:hover {
    background: rgba(255, 0, 0, 1);
}

/* 근황 카드의 이미지 표시 */
.update-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.update-image-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.update-image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.update-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 이미지 모달 스타일 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.image-modal-close:hover {
    color: #ccc;
}

.image-modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

/* 댓글 섹션 스타일 */
.comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.comments-title {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 15px;
    font-weight: 600;
}

.comments-list {
    display: grid;
    gap: 12px;
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #764ba2;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-actions {
    display: flex;
    gap: 5px;
}

.edit-comment-btn,
.delete-comment-btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.edit-comment-btn:hover {
    background-color: #e3f2fd;
}

.delete-comment-btn:hover {
    background-color: #ffebee;
}

.comment-content-display {
    display: block;
}

.comment-edit-form {
    margin-top: 10px;
}

.comment-edit-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 10px;
    align-items: start;
}

.comment-edit-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.save-comment-btn,
.cancel-comment-edit-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.save-comment-btn {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
}

.save-comment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(118, 75, 162, 0.4);
}

.cancel-comment-edit-btn {
    background: #e0e0e0;
    color: #666;
}

.cancel-comment-edit-btn:hover {
    background: #d0d0d0;
}

.edit-commenter-name,
.edit-comment-content {
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.edit-commenter-name:focus,
.edit-comment-content:focus {
    outline: none;
    border-color: #764ba2;
}

.edit-comment-content {
    resize: vertical;
    min-height: 50px;
}

.comment-author {
    font-weight: 600;
    color: #764ba2;
    font-size: 0.9rem;
}

.comment-date {
    color: #999;
    font-size: 0.85rem;
}

.comment-content {
    color: #666;
    line-height: 1.5;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

.no-comments {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 0.9rem;
}

/* 댓글 작성 폼 */
.comment-form {
    margin-top: 15px;
}

.comment-form-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 10px;
    align-items: start;
}

.commenter-name {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.commenter-name:focus {
    outline: none;
    border-color: #764ba2;
}

.comment-content-input {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.3s ease;
}

.comment-content-input:focus {
    outline: none;
    border-color: #764ba2;
}

.comment-submit-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

.comment-submit-btn:active {
    transform: translateY(0);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #888;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* 모임 멤버 관리 섹션 스타일 */
.members-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.members-header h2 {
    color: #667eea;
    margin-bottom: 0;
    font-size: 1.8rem;
    border-bottom: none;
    padding-bottom: 0;
}

.toggle-members-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toggle-members-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.members-management {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.members-list {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #764ba2;
    gap: 10px;
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.member-name {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
}

.member-email-display {
    display: block;
}

.member-email {
    font-size: 0.85rem;
    color: #888;
}

.member-email.no-email {
    color: #ccc;
    font-style: italic;
}

.member-email-edit {
    display: none;
    flex: 1;
    align-items: center;
    gap: 8px;
}

.edit-member-email-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.edit-member-email-input:focus {
    outline: none;
    border-color: #667eea;
}

.member-edit-actions {
    display: flex;
    gap: 5px;
}

.save-member-email-btn,
.cancel-member-email-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-member-email-btn {
    color: #4caf50;
}

.save-member-email-btn:hover {
    background-color: #e8f5e9;
}

.cancel-member-email-btn {
    color: #f44336;
}

.cancel-member-email-btn:hover {
    background-color: #ffebee;
}

.member-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.edit-member-email-btn,
.delete-member-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.edit-member-email-btn:hover {
    background-color: #e3f2fd;
}

.delete-member-btn:hover {
    background-color: #ffebee;
}

.add-member-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.add-member-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.add-member-section .form-group {
    margin-bottom: 15px;
}

.add-member-section .form-group:last-of-type {
    margin-bottom: 0;
}

.add-member-section .form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.add-member-section .form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.add-member-section .form-group button {
    width: 100%;
}

.add-member-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.add-member-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

.add-member-btn:active {
    transform: translateY(0);
}

/* 모임 선택 페이지 스타일 */
.group-selection-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.groups-list {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.group-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 15px;
}

.group-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.group-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
}

.group-card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.edit-group-info-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.edit-group-info-btn:hover {
    background-color: #e3f2fd;
}

.group-info-display {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.group-info-item {
    display: flex;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.group-info-item:first-child {
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.group-info-label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
    margin-right: 10px;
}

.group-info-value {
    color: #666;
    flex: 1;
}

.group-info-item:first-child .group-info-value {
    color: #667eea;
    font-weight: 600;
    font-size: 1rem;
}

.group-info-edit {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.group-info-edit h4 {
    color: #667eea;
    font-size: 1.1rem;
    margin-bottom: 15px;
    margin-top: 20px;
}

.group-info-edit h4:first-child {
    margin-top: 0;
}

.group-info-edit .form-group {
    margin-bottom: 15px;
}

.group-info-edit .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.group-info-edit .form-group input[type="date"],
.group-info-edit .form-group input[type="time"],
.group-info-edit .form-group input[type="text"],
.group-info-edit .form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: white;
}

.group-info-edit .form-group select {
    cursor: pointer;
}

.group-info-edit .form-group input:focus,
.group-info-edit .form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.group-info-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.save-group-info-btn,
.cancel-group-info-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.save-group-info-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.save-group-info-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.cancel-group-info-btn {
    background: #e0e0e0;
    color: #666;
}

.cancel-group-info-btn:hover {
    background: #d0d0d0;
}

/* 리더 이름 입력 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.modal-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-submit-btn,
.modal-cancel-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.modal-cancel-btn {
    background: #e0e0e0;
    color: #666;
}

.modal-cancel-btn:hover {
    background: #d0d0d0;
}

.select-group-btn {
    padding: 10px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.select-group-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.select-group-btn:active {
    transform: translateY(0);
}

.add-group-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.add-group-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.add-group-section .form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.add-group-section .form-group input {
    flex: 1;
}

.add-group-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.add-group-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

.add-group-btn:active {
    transform: translateY(0);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    section {
        padding: 20px;
    }

    .update-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .comment-form-row {
        grid-template-columns: 1fr;
    }

    .comment-submit-btn {
        width: 100%;
    }

    .comment-edit-row {
        grid-template-columns: 1fr;
    }

    .comment-edit-actions {
        flex-direction: row;
        width: 100%;
    }

    .save-comment-btn,
    .cancel-comment-edit-btn {
        flex: 1;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .change-group-btn {
        width: 100%;
    }

    .group-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .group-card-actions {
        width: 100%;
        justify-content: space-between;
    }

    .select-group-btn {
        flex: 1;
    }

    .group-info-item {
        flex-direction: column;
        gap: 5px;
    }

    .group-info-label {
        min-width: auto;
    }

    .group-info-edit-actions {
        flex-direction: column;
    }

    .save-group-info-btn,
    .cancel-group-info-btn {
        width: 100%;
    }

    .add-group-section .form-group {
        flex-direction: column;
    }

    .add-group-btn {
        width: 100%;
    }

    .members-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .toggle-members-btn {
        width: 100%;
    }

    .add-member-section .form-group {
        flex-direction: column;
    }

    .add-member-btn {
        width: 100%;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-submit-btn,
    .modal-cancel-btn {
        width: 100%;
    }

    .image-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .preview-image-item {
        width: 100%;
    }

    .update-images {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* 이미지 수정 섹션 스타일 */
.edit-images-section {
    margin-top: 10px;
}

.edit-existing-images {
    margin-bottom: 20px;
}

.existing-images-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.existing-images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.existing-image-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.existing-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-existing-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.remove-existing-image-btn:hover {
    background: rgba(255, 0, 0, 1);
}

.no-images-message {
    color: #999;
    font-size: 0.9rem;
    padding: 10px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.edit-new-images {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.add-images-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.edit-images-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.edit-images-input:hover {
    border-color: #667eea;
}

.edit-image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
