/* CatSEye - Apple-Inspired Minimal Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --white: #FFFFFF;
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #FAFAFA;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --text-tertiary: #AEAEB2;
    --accent: #007AFF;
    --accent-hover: #0056CC;
    --accent-light: rgba(0, 122, 255, 0.1);
    --success: #34C759;
    --error: #FF3B30;
    --warning: #FF9500;
    --border: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }
.logo:hover { opacity: 0.8; }

/* Hamburger Menu Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.nav-links a:hover {
    color: var(--text-primary);
    background: var(--border);
}

/* Nav loading state - hide all links initially */
.nav-links:not(.loaded) > a,
.nav-links:not(.loaded) > span,
.nav-links:not(.loaded) > button {
    display: none !important;
}

/* Nav Skeleton UI */
.nav-skeleton {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-links.loaded .nav-skeleton {
    display: none;
}
.skeleton-item {
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
    height: 32px;
}
.skeleton-item.skeleton-menu {
    width: 70px;
}
.skeleton-item.skeleton-user {
    width: 120px;
}
.skeleton-item.skeleton-btn {
    width: 60px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Content Skeleton Cards */
.skeleton-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.skeleton-card .skeleton-photo {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-card .skeleton-body {
    padding: 16px;
}

.skeleton-card .skeleton-title {
    height: 20px;
    width: 60%;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-card .skeleton-text {
    height: 14px;
    width: 80%;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 6px;
}

.skeleton-card .skeleton-text.short {
    width: 50%;
}

/* Post Skeleton */
.skeleton-post-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.skeleton-post-card .skeleton-badge {
    height: 24px;
    width: 60px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
    margin-bottom: 12px;
}

.skeleton-post-card .skeleton-title {
    height: 18px;
    width: 80%;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-post-card .skeleton-text {
    height: 14px;
    width: 100%;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-post-card .skeleton-text.short {
    width: 40%;
}

/* Match Skeleton */
.skeleton-match-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 20px;
    align-items: center;
}

.skeleton-match-card .skeleton-section {
    flex: 1;
}

.skeleton-match-card .skeleton-title {
    height: 16px;
    width: 70%;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-match-card .skeleton-text {
    height: 12px;
    width: 50%;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-match-card .skeleton-arrow {
    width: 30px;
    height: 30px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 50%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-content h1 {
    margin-bottom: 4px;
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

.header-subtitle strong {
    color: var(--accent);
    font-weight: 600;
}

/* Search & Filter Bar */
.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 14px 40px 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2386868B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-select:hover {
    border-color: var(--text-tertiary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Typography */
h1 {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
h1 span { color: var(--accent); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    min-height: 44px; /* iOS 터치 타겟 최소 규격 */
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--error);
    color: white;
}
.btn-danger:hover {
    opacity: 0.9;
}

.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Post Detail */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}
.detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.detail-label {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}
.detail-value {
    font-size: 14px;
    color: var(--text-primary);
}
.detail-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.detail-desc-content {
    margin-top: 8px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

/* Card */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* Toast / Flash */
.flash {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 14px;
}
.flash.success { background: rgba(52, 199, 89, 0.12); color: #1D7D35; border: 1px solid rgba(52, 199, 89, 0.3); }
.flash.error { background: rgba(255, 59, 48, 0.12); color: #C41E16; border: 1px solid rgba(255, 59, 48, 0.3); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}
.form-group label .required { color: var(--error); }

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--accent-light);
}
.form-control::placeholder { color: var(--text-tertiary); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2386868B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}
select.form-control option { background: var(--white); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Photo */
.photo-preview {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 1px solid var(--border);
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
}
.file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0; top: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%; height: 100%;
}

/* Photos Grid (Registration Form) */
.photos-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 8px;
}

.photos-grid .photo-item {
    position: relative;
    width: 120px;
    height: 150px;
    border-radius: 12px;
    overflow: visible;
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.photos-grid .photo-item:active {
    cursor: grabbing;
}

.photos-grid .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--border);
    pointer-events: none;
}

.photos-grid .photo-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.photos-grid .photo-item.drag-over-left::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.photos-grid .photo-item.drag-over-right::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.photos-grid .photo-item.ghost-dragging {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    opacity: 1;
}

.photos-grid .photo-item.ghost-dragging img {
    border-color: var(--accent);
}

.photo-remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--error);
    color: #fff;
    border: 2px solid #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.photo-remove-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

/* Photo Gallery */
.photo-gallery-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.photo-gallery {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.photo-gallery .photo-item {
    position: relative;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: grab;
    transition: all 0.2s ease;
    background: var(--bg-tertiary);
}

.photo-gallery .photo-item:active {
    cursor: grabbing;
}

.photo-gallery .photo-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.photo-gallery .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-gallery .photo-item .main-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 100px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.photo-gallery .photo-item .photo-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-gallery .photo-item:hover .photo-delete-btn {
    opacity: 1;
}

.photo-gallery .photo-item .photo-delete-btn:hover {
    background: var(--error);
}

.photo-gallery .photo-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.photo-gallery .photo-item.drag-over {
    border-color: var(--accent);
    background: var(--accent-light);
}

.photo-add-btn {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-tertiary);
    position: relative;
}

.photo-add-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.photo-add-btn span {
    font-size: 32px;
    color: var(--text-tertiary);
    line-height: 1;
}

.photo-add-btn p {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.photo-add-btn:hover span,
.photo-add-btn:hover p {
    color: var(--accent);
}

.photo-add-btn input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.photo-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

/* Tags */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.tag-item {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    background: var(--white);
}
.tag-item:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.tag-item.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Entertainer Grid - Modern Profile Card */
.entertainer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.entertainer-card {
    display: block;
    text-decoration: none;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.entertainer-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* Photo Section */
.card-photo-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: linear-gradient(145deg, #E5E5EA 0%, #D1D1D6 100%);
}

.card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.entertainer-card:hover .card-photo {
    transform: scale(1.05);
}

.card-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #E5E5EA 0%, #C7C7CC 100%);
}

.card-photo-placeholder span {
    font-size: 72px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.15);
}

/* Level Badge */
.card-level-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: help;
    z-index: 1;
}

/* Card Body */
.card-body {
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.card-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin: 0;
}

.card-gender {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

.card-gender.male {
    background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
    color: white;
}

.card-gender.female {
    background: linear-gradient(135deg, #FF2D55 0%, #FF6B8A 100%);
    color: white;
}

.card-type {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
}

.card-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0 0 16px 0;
}

.card-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.view-profile {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    transition: all 0.2s ease;
}

.entertainer-card:hover .view-profile {
    letter-spacing: 0.5px;
}

/* Card Hover Shine Effect */
.entertainer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.entertainer-card {
    position: relative;
}

.entertainer-card:hover::before {
    left: 100%;
}

/* Empty State Enhancement */
#emptyState {
    text-align: center;
    padding: 80px 40px;
}

#emptyState p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}

/* Detail View */
.detail-view-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.detail-item {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--radius-md);
}
.detail-label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.detail-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.tag-section { margin-top: 20px; }
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.tag.talent { background: rgba(175, 82, 222, 0.12); color: #AF52DE; }
.tag.skill { background: rgba(0, 122, 255, 0.12); color: var(--accent); }
.tag.image { background: rgba(255, 149, 0, 0.12); color: var(--warning); }

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}
.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.post-card:hover {
    box-shadow: var(--shadow-md);
}
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.post-category {
    background: var(--accent-light);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}
.post-date { color: var(--text-tertiary); font-size: 13px; }
.post-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
    line-height: 1.4;
    color: var(--text-primary);
}
.post-info { font-size: 14px; color: var(--text-secondary); margin-bottom: 14px; }
.post-info div { margin-bottom: 6px; }
.post-info .label { color: var(--text-tertiary); }
.post-contact {
    font-size: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.post-contact .email-addr { color: var(--accent); margin-top: 4px; font-weight: 500; }
.post-contact .no-email { color: var(--error); margin-top: 4px; font-size: 13px; }
.post-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 14px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.post-link:hover { text-decoration: underline; }

/* Match List */
.match-list { display: flex; flex-direction: column; gap: 12px; }
.match-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.match-card:hover {
    box-shadow: var(--shadow-md);
}
.match-card.selected {
    background: var(--accent-light);
    border-color: var(--accent);
}
.match-checkbox { flex-shrink: 0; }
.match-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent);
}
.match-content { flex: 1; display: flex; align-items: center; gap: 24px; }
.match-post, .match-entertainer { flex: 1; }
.match-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}
.match-post h4, .match-entertainer h4 {
    font-size: 15px;
    margin-bottom: 8px;
    font-weight: 600;
}
.match-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-secondary);
}
.match-email { margin-top: 8px; font-size: 13px; color: var(--accent); }
.match-arrow { color: var(--text-tertiary); font-size: 20px; flex-shrink: 0; }
.match-actions { flex-shrink: 0; }

/* History Table */
.history-table { width: 100%; border-collapse: collapse; }
.history-table th, .history-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.history-table th {
    color: var(--text-tertiary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-tertiary);
}
.history-table tbody tr:hover {
    background: var(--bg-tertiary);
}
.history-post-title {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.email-cell { color: var(--accent); font-size: 14px; }
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}
.status-badge.success { background: rgba(52, 199, 89, 0.12); color: var(--success); }
.status-badge.error { background: rgba(255, 59, 48, 0.12); color: var(--error); cursor: help; }
.status-badge.pending { background: rgba(255, 149, 0, 0.12); color: var(--warning); }

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: var(--white);
}
.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    text-align: center;
    max-width: 420px;
    width: 100%;
}
.login-card h1 {
    margin-bottom: 12px;
    font-size: 28px;
}
.login-card p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
}
.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    background: var(--text-primary);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
}
.google-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}
.google-btn svg { width: 20px; height: 20px; }

/* Modal */
#draftModal > div {
    background: var(--white) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
}
#draftModal h3 { color: var(--accent) !important; }
#draftModal p { color: var(--text-secondary) !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* Selection */
::selection {
    background: var(--accent-light);
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .container { padding: 20px 16px; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-view-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    .detail-view-grid > div:first-child {
        max-width: 200px;
        margin: 0 auto;
    }
    .match-content { flex-direction: column; align-items: flex-start; }
    .match-arrow { transform: rotate(90deg); }
    .navbar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
    }
    .hamburger-btn {
        display: flex;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        margin-top: 8px;
        padding: 8px 0;
        order: 3;
    }
    .nav-links.mobile-open {
        display: flex;
    }
    .nav-links a {
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
    }
    .nav-links a:last-of-type {
        border-bottom: none;
    }
    .nav-links #level-widget,
    .nav-links #user-info {
        padding: 14px 20px;
        border-top: 1px solid var(--border);
    }

    /* Page Header Mobile */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .page-header .btn {
        width: 100%;
        justify-content: center;
    }

    /* Filter Bar Mobile */
    .filter-bar {
        flex-direction: column;
        gap: 12px;
    }
    .search-wrapper {
        max-width: none;
        min-width: auto;
    }
    .filter-group {
        width: 100%;
    }
    .filter-select {
        flex: 1;
    }

    /* Cards Mobile */
    .entertainer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .card-photo-wrapper { aspect-ratio: 1/1; }
    .card-body { padding: 14px; }
    .card-name { font-size: 15px; }
    .card-gender { width: 18px; height: 18px; font-size: 11px; }
    .card-type { font-size: 12px; }
    .card-meta { font-size: 11px; margin-bottom: 10px; }
    .card-footer { padding-top: 10px; }
    .view-profile { font-size: 12px; }
    .card-photo-placeholder span { font-size: 40px; }

    .posts-grid { grid-template-columns: 1fr; }
    .card { padding: 20px; border-radius: var(--radius-lg); }
    h1 { font-size: 26px; margin-bottom: 12px; }
    .btn { padding: 10px 18px; font-size: 14px; min-height: 44px; }
    .tag-item { padding: 6px 12px; font-size: 13px; }
    .header-area {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .header-area h1 {
        width: 100%;
        font-size: 22px !important;
    }

    /* Photo Gallery Mobile (for edit/register page only) */
    .photo-gallery .photo-item,
    .photo-gallery .photo-add-btn {
        height: 100px;
    }

    .photo-add-btn span {
        font-size: 24px;
    }

    .photo-add-btn p {
        font-size: 10px;
    }

    /* Empty State Mobile */
    .empty-state {
        padding: 60px 24px;
    }
    .empty-icon { font-size: 48px; }
    .empty-state h3 { font-size: 18px; }
}

/* Small Mobile */
@media (max-width: 400px) {
    .entertainer-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .card-body { padding: 20px; }
    .card-name { font-size: 18px; }
    .card-gender { width: 22px; height: 22px; font-size: 13px; }
}

/* iPhone SE 기준 (375px) — 모바일 퍼스트 최소 규격 */
@media (max-width: 375px) {
    .container { padding: 12px 16px; }
    h1 { font-size: 22px; }
    .card { padding: 16px; }
    .btn { width: 100%; justify-content: center; }
    .posts-grid { gap: 12px; }
    .entertainer-grid { gap: 12px; }
    .navbar { padding: 10px 16px; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s ease forwards; }

/* YouTube Grid */
.youtube-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.youtube-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
}

.youtube-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .youtube-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .youtube-video {
        border-radius: 12px;
    }
}

/* Profile Photo Gallery */
.photo-section {
    margin-bottom: 0;
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.photo-gallery-grid .gallery-photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-gallery-grid .gallery-photo:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.no-photo-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(145deg, #E8E8ED 0%, #F5F5F7 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-photo-placeholder span {
    font-size: 72px;
    color: #007AFF;
    font-weight: 600;
}

/* Photo Gallery - 1장일 때 전체 너비 */
.photo-gallery-grid:has(.gallery-photo:only-child) {
    grid-template-columns: 1fr;
    max-width: 400px;
}

/* Photo Gallery - 3장일 때 */
.photo-gallery-grid:has(.gallery-photo:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
}

/* Photo Gallery Mobile */
@media (max-width: 768px) {
    .photo-section {
        margin-left: -16px;
        margin-right: -16px;
        width: calc(100% + 32px);
    }

    .photo-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
    }

    .photo-gallery-grid .gallery-photo {
        border-radius: 0;
    }

    .photo-gallery-grid:has(.gallery-photo:only-child) {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .no-photo-placeholder {
        border-radius: 0;
    }

    .no-photo-placeholder span {
        font-size: 48px;
    }
}
