/* Toss 스타일 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Pretendard', Roboto, sans-serif;
    background: #f8f9fa;
    color: #191f28;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100vh;
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 헤더 스타일 */
header {
    background: #ffffff;
    border: 1px solid #e9ecef;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
}

header h1 {
    color: #191f28;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* 메인 탭 스타일 */
.main-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.main-tab-btn {
    background: #ffffff;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.main-tab-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-tab-btn.active {
    background: #0064ff;
    color: #ffffff;
    border-color: #0064ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.tab-content {
    margin-bottom: 12px;
}

/* 뷰 선택 버튼 스타일 */
.view-buttons {
    display: flex;
    justify-content: center;
    gap: 12px; /* country-buttons와 동일 */
    margin-bottom: 12px; /* country-buttons와 동일 */
    flex-wrap: wrap; /* country-buttons와 동일 */
}

.view-btn {
    background: #ffffff;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 12px 20px; /* country-btn과 동일한 패딩 */
    border-radius: 12px; /* country-btn과 동일한 라운드 */
    cursor: pointer;
    font-size: 14px; /* country-btn과 동일한 폰트 크기 */
    font-weight: 600; /* country-btn과 동일한 두께 */
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* country-btn과 동일한 그림자 */
    min-width: 90px; /* 시각적 균형을 위한 최소 너비 */
}

.view-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.view-btn.active {
    background: #0064ff;
    color: #ffffff;
    border-color: #0064ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.25);
}

/* 촬영회 리스트 컨테이너 */
.shooting-list-container {
    height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.shooting-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shooting-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.shooting-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-color: #0064ff;
}

.shooting-item.past {
    opacity: 0.7;
    background: #f8f9fa;
}

.shooting-item.upcoming {
    border-left: 4px solid #0064ff;
}

.shooting-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.shooting-name {
    font-size: 18px;
    font-weight: 700;
    color: #191f28;
    margin: 0;
}

.shooting-date {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.shooting-address {
    font-size: 14px;
    color: #495057;
    margin: 8px 0;
    line-height: 1.4;
}

.shooting-description {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 12px;
}

.shooting-hosts {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.shooting-hosts h4 {
    font-size: 14px;
    font-weight: 600;
    color: #191f28;
    margin-bottom: 8px;
}

.host-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.host-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #495057;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.host-date {
    font-weight: 500;
}

.host-capacity {
    color: #6c757d;
    font-size: 12px;
}

.country-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.country-btn {
    background: #ffffff;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.country-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.country-btn.active {
    background: #0064ff;
    color: #ffffff;
    border-color: #0064ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.admin-link {
    margin-top: 12px;
}

.admin-btn {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
}
/* 로그인한 유저 표시 칩 */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
}

.user-chip img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.logout-btn {
    margin-left: 8px;
    background: #fff;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.logout-btn:hover {
    background: #f1f3f5;
}

.admin-btn:hover {
    background: #e9ecef;
    color: #191f28;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* X 로그인 버튼 */
.x-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0f1419;
    color: #ffffff;
    border-color: #0f1419;
}

.x-login-btn:hover {
    background: #1d232a;
    color: #ffffff;
    border-color: #1d232a;
}

.x-login-btn .x-logo svg {
    fill: currentColor;
    display: block;
}

.x-login-btn .x-label {
    font-weight: 600;
}

/* 메인 레이아웃 */
main {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    flex: 1;
    min-height: 0;
    padding: 24px 0;
}

/* 지도 컨테이너 */
.map-container {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
}

#map {
    flex: 1;
    min-height: 400px;
    width: 100%;
}

.map-info {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.map-info h3 {
    color: #191f28;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.map-info p {
    color: #6c757d;
    line-height: 1.5;
    font-size: 14px;
}

/* 위치 패널 */
.location-panel {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
}

.panel-header {
    background: #0064ff;
    color: #ffffff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.panel-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

/* 위치 상세 정보 */
.location-detail {
    margin-bottom: 20px;
}

.location-detail h4 {
    color: #0064ff;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.location-detail p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 14px;
}

/* 일기 관련 스타일 */
.visit-info {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

.visit-info h3 {
    color: #191f28;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.diary-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.diary-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.diary-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.diary-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.diary-header h4 {
    color: #191f28;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.diary-content {
    color: #495057;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

.no-diary {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.location-detail .info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.location-detail .info-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.location-detail .info-value {
    color: #6c757d;
    font-size: 14px;
}

.attractions-list {
    list-style: none;
    padding: 0;
}

.attractions-list li {
    background: #f8f9fa;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 3px solid #0064ff;
    font-size: 14px;
    color: #495057;
}

.location-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
    
    .location-panel {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    header {
        padding: 20px 0;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .country-buttons {
        gap: 8px;
    }
    
    .country-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    main {
        height: auto;
        gap: 16px;
        padding: 16px 0;
    }
    
    #map {
        min-height: 300px;
    }
}

/* Leaflet 지도 커스터마이징 */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
}

.leaflet-popup-content {
    margin: 16px;
    font-family: inherit;
    font-size: 14px;
}

.leaflet-popup-tip {
    background: #ffffff;
}

/* 로딩 애니메이션 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6c757d;
    font-size: 14px;
}

.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #0064ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* 범례 스타일 */
.legend {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    padding: 20px !important;
    font-size: 13px !important;
    font-family: inherit !important;
    min-width: 120px !important;
}

.legend h4 {
    margin: 0 0 12px 0 !important;
    color: #191f28 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.legend div {
    display: flex !important;
    align-items: center !important;
    margin: 8px 0 !important;
    white-space: nowrap !important;
}

.legend div div {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    margin-right: 10px !important;
    flex-shrink: 0 !important;
}

.legend span {
    color: #495057 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* 참가 신청 UI 스타일 */
.application-section {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.capacity-info h4 {
    color: #191f28;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.role-capacity {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.role-capacity span {
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: #495057;
    border: 1px solid #e9ecef;
    font-weight: 500;
}

.application-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.apply-btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.apply-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.apply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pursuer-btn {
    background: #FF6B9D;
    color: white;
}

.photographer-btn {
    background: #4ECDC4;
    color: white;
}

.supporter-btn {
    background: #FFE066;
    color: #191f28;
}

.participants-list h4 {
    color: #191f28;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.participants {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.participant {
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.participant.pursuer {
    color: #FF6B9D;
    border-color: #FF6B9D;
    background: #fdf2f8;
}

.participant.photographer {
    color: #4ECDC4;
    border-color: #4ECDC4;
    background: #f0fdfa;
}

.participant.supporter {
    color: #d97706;
    border-color: #FFE066;
    background: #fffbeb;
}

/* 촬영회 상세 정보 모달 스타일 */
.shooting-detail-content {
    padding: 16px;
}

.detail-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-section h3 {
    color: #191f28;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    border-left: 3px solid #FF6B9D;
    padding-left: 12px;
}

.detail-section h4 {
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #4ECDC4;
}

.session-item.past {
    opacity: 0.6;
    border-left-color: #6c757d;
}

.session-date {
    font-weight: 600;
    color: #191f28;
    margin-bottom: 4px;
}

.session-time {
    color: #495057;
    font-size: 14px;
    margin-bottom: 4px;
}

.session-capacity {
    color: #6c757d;
    font-size: 13px;
}

.capacity-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.role-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    gap: 12px;
}

.role-label {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    min-width: 60px;
    text-align: center;
}

.role-label.pursuer {
    background: #FF6B9D;
}

.role-label.photographer {
    background: #4ECDC4;
}

.role-label.supporter {
    background: #FFE066;
    color: #191f28;
}

.role-count {
    font-weight: 600;
    color: #191f28;
    min-width: 40px;
}

.role-remaining {
    color: #6c757d;
    font-size: 13px;
}

.apply-buttons-modal {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.modal-apply-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.participants-section {
    margin-top: 16px;
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.participant-card {
    background: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    text-align: center;
    transition: transform 0.2s ease;
}

.participant-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.participant-card.pursuer {
    border-color: #FF6B9D;
    background: rgba(255, 107, 157, 0.05);
}

.participant-card.photographer {
    border-color: #4ECDC4;
    background: rgba(78, 205, 196, 0.05);
}

.participant-card.supporter {
    border-color: #FFE066;
    background: rgba(255, 224, 102, 0.05);
}

.participant-name {
    display: block;
    font-weight: 600;
    color: #191f28;
    margin-bottom: 2px;
}

.participant-role {
    display: block;
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
}

.no-participants {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin: 16px 0;
}

/* 역할별 신청 UI 스타일 */
.user-application {
    text-align: center;
    margin-top: 16px;
}

.main-apply-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

.main-apply-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.application-status {
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    display: inline-block;
}

.status-pending {
    background: #ffc107;
    color: #212529;
}

.status-approved {
    background: #28a745;
}

.status-rejected {
    background: #dc3545;
}

.application-full {
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.full-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #f39c12;
    color: white;
    margin-bottom: 4px;
    display: inline-block;
}

.login-required, .role-required {
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
}

.login-message, .role-message {
    color: #1976d2;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.login-link, .role-select-btn {
    padding: 8px 16px;
    background: #2196f3;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.login-link:hover, .role-select-btn:hover {
    background: #1976d2;
}

/* 모달 내 신청 관련 스타일 */
.login-required-modal, .role-required-modal, .application-status-modal, .application-full-modal {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.login-link-btn {
    padding: 10px 20px;
    background: #1DA1F2;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
    margin-top: 8px;
}

.login-link-btn:hover {
    background: #0d8bd9;
}

.modal-apply-info {
    margin-bottom: 12px;
    color: #495057;
}

.status-info, .full-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
} 