/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.insight-page > .container {
    max-width: 100%;       /* 1. 이 값을 100%로 덮어씌웁니다. */
    width: 100%;           /* 2. 명시적으로 100% 너비 설정 */
    margin: 0;             /* 3. 중앙 정렬 마진을 제거합니다. */
    padding: 2rem 2rem;    /* 요청하신 2rem 패딩 */
    box-sizing: border-box;     
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.logo i {
    font-size: 2.5rem;
    color: #ffd700;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
    margin-right: 8px;
}

.logout-btn {
    background: #ef4444; 
    color: white; 
    border: 1px solid #ef4444; 
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.logout-btn:hover {
    background: #dc2626; 
    border-color: #dc2626; 
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.logout-btn i {
    font-size: 0.75rem;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Insight Page Layout */
.insight-sidebar {
    width: 200px; /* 좌측 배너 고정 너비 */
    flex-shrink: 0;
}

.insight-sidebar h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e5e9;
}

.insight-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.insight-sidebar li {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.3s ease;
    position: relative;
}

.insight-sidebar li:hover {
    background: #f8f9fa;
    color: #667eea;
}

.insight-sidebar li.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-weight: 600;
}

.insight-sidebar li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #667eea;
    border-radius: 0 4px 4px 0;
}

/* 데이터를 불러오는 동안 사이드바 비활성화 */
.insight-sidebar.loading ul {
    pointer-events: none; /* 클릭 방지 */
    opacity: 0.6;
}

main.insight-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem; /* 좌우 간격 */

    /* --- 새로 추가/수정할 부분 --- */
    width: 100%;         /* 부모(.insight-page > .container)의 너비를 100% 사용 */
    max-width: none;     /* 혹시 다른 곳에서 제한된 max-width를 무효화 */
    /* margin: 0; */     /* flex 아이템이므로 별도 마진 필요없음 */
    /* padding: 0; */    /* 이 레이아웃 내부의 padding은 0으로 시작하여, insight-main에서 조절 */
    box-sizing: border-box;
    /* --- 여기까지 --- */
}


.insight-main {
    /* --- 기존 코드 유지 --- */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* 이 부분이 병렬 정렬을 담당 */
    gap: 24px;
    margin-top: 1.5rem;
    /* --- 새로 추가할 부분 --- */
    width: 100%; /* 부모(.insight-main)의 너비를 100% 사용 */
    /* --- 여기까지 --- */
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 1.5rem;
}

/* 차트박스 */
.stat-card {
  /* --- 기존 코드 유지 --- */
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    transition: all 0.3s ease;
    /* --- 새로 추가할 부분 --- */
    width: 100%; /* stats-grid의 1fr에 맞게 100% 사용 */
    /* --- 여기까지 --- */
}

.chart-wrapper {
  height: 300px;
  margin-top: 1rem;
}

.stat-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}




/******************************** 회원가입 **************************************/
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    padding-top: 3rem; 
    padding-bottom: 3rem;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 450px;
    animation: slideInUp 0.5s ease;
    padding: 3rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem; /* 4. 간격 가독성 좋게: 헤더와 폼 사이 간격 */
}

.login-header .logo {
    margin-bottom: 1rem;
}

.login-header .logo h1 {
    font-size: 2.5rem;
}

.login-tagline {
    color: #666;
    font-size: 1rem;
    font-weight: 400;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-top: 1rem; 
}

.signup-form .form-group:first-child {
    margin-top: 0; /* 첫 번째 폼 그룹의 위쪽 마진은 없애줍니다. */
}


.form-group .input-group {
    display: flex; /* 자식 요소들을 가로로 정렬 */
    gap: 10px; /* input-wrapper와 버튼 사이 간격 */
    align-items: center; /* 세로 중앙 정렬 */
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex; /* 내부 아이템(i, input)을 flex로 정렬 */
    align-items: center;
    flex-grow: 1; /* 부모(.input-group) 내에서 남은 공간을 모두 차지 */
    /* ... 기존 input-wrapper 스타일 유지 ... */
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: #666;
    z-index: 1;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper select {
    cursor: pointer;
}

#phoneNumber {
    padding-left: 3rem; /* 이름 칸에 영향 없이 휴대폰 번호만 간격 늘리기 */
}

.form-group .input-group .input-wrapper i.fa-mobile-alt {
    left: 1.25rem; /* 기존 1rem에서 조금 더 오른쪽으로 이동 (조정 가능) */
}

/* 중복 확인 버튼 스타일 */
.btn-check-duplicate {
    padding: 0.7rem 1.2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    /* ⭐ 추가: 휴대폰 번호 인풋과 높이를 맞추기 위해 flexbox 정렬 활용 */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.25rem;
}
.btn-check-duplicate:hover {
    background: #5a67d8; /* 호버 시 색상 변경 */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.btn-check-duplicate:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 휴대폰 번호 상태 메시지 (필요시 추가 색상) */
.form-group .form-help {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    /* JS에서 직접 색상을 주입하므로 여기서는 기본값만 */
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 1;
}

.toggle-password:hover {
    color: #333;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #333;
    font-size: 0.9rem;
}

.radio-wrapper input[type="radio"] {
    display: none;
}

.radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-wrapper input[type="radio"]:checked + .radio-mark {
    border-color: #667eea;
}

.radio-wrapper input[type="radio"]:checked + .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #666;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem; 
    gap: 0.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
    color: #666;
    font-size: 0.9rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.divider span {
    background: white;
    padding: 0 1rem;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-btn.google:hover {
    border-color: #db4437;
    color: #db4437;
}

.social-btn.github:hover {
    border-color: #333;
    color: #333;
}

.signup-link {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.signup-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Modal styles */
.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: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e5e9;
}

.modal-header h2 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.signup-form {
    margin-bottom: 1rem;
}

.signup-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

.terms-link {
    color: #667eea;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Main content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* URL Form */
.url-form-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.url-form {
    width: 100%;
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.input-group input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

/* Result container */
.result-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease;
}

.result-card h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.short-url-display {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

.short-url-display input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    background: #f8f9fa;
    color: #333;
    font-weight: 500;
}

.copy-btn {
    padding: 1rem 1.5rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.url-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e1e5e9;
}

.info-item:last-child {
    border-bottom: none;
}

.label {
    font-weight: 600;
    color: #666;
}

.value {
    color: #333;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}


/* 목록 삭제 모달*/
btn-primary.btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); /* 빨간색 계열 */
}

.btn-primary.btn-delete:hover {
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3); /* 빨간색 그림자 */
}

/* History container */
.history-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.history-container h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.url-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.history-urls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.original-url {
    font-size: 0.9rem;
    color: #666;
    word-break: break-all;
}

.short-url {
    font-size: 1rem;
    color: #667eea;
    font-weight: 600;
    word-break: break-all;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.history-btn {
    padding: 0.5rem;
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.history-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Loading spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #28a745;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    animation: slideInRight 0.3s ease;
}

.notification.error {
    background: #dc3545;
}

.notification.warning {
    background: #ffc107;
    color: #333;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header-top {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .short-url-display {
        flex-direction: column;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .value {
        max-width: 100%;
        text-align: left;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .history-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* 제목 수정 버튼 */
.edit-title-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.edit-title-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #5a67d8;
}

.history-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

/* 모달 스타일 */
.modal-overlay {
    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: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 500px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.modal-body {
    padding: 24px;
}

.modal-body .form-group {
    margin-bottom: 0;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.modal-body input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.modal-body input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* 반응형 모달 */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px 20px;
    }
}

/* 비밀번호 변경 버튼 */
.change-password-btn {
    background: #667eea;
    color: white;
    border: 1px solid #667eea;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.change-password-btn:hover {
    background: #5a67d8; /* 호버 시 색상 */
    border-color: #5a67d8; /* 호버 시 테두리 색상 */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.change-password-btn i {
    font-size: 0.75rem;
}

/* 비밀번호 입력 필드 */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.toggle-password-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.toggle-password-btn:hover {
    background: rgba(113, 128, 150, 0.1);
    color: #4a5568;
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #718096;
    line-height: 1.4;
} 