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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

header h1 {
    color: #333;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #666;
    font-size: 1em;
}

/* 탭 메뉴 */
.tabs {
    display: flex;
    gap: 6px;
    margin: 20px auto 20px;
    max-width: 900px;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 10px;
}

.tab-btn {
    padding: 10px 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
}

.tab-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

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

.tab-btn:hover::after {
    content: attr(data-short);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    animation: tooltipFade 0.3s ease;
}

@keyframes tooltipFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 통합 검색바 */
.main-search-bar {
    display: flex;
    gap: 0;
    margin: 30px auto 40px;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s;
}

.main-search-bar:focus-within {
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.main-search-bar input {
    flex: 1;
    padding: 18px 30px;
    border: none;
    font-size: 16px;
    outline: none;
    background: white;
}

.main-search-bar .search-btn {
    padding: 18px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.main-search-bar .search-btn:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
}

.controls {
    margin-bottom: 30px;
}

.crawl-section, .search-section, .status-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.crawl-section h3, .search-section h3, .status-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.status-value {
    color: #667eea;
    font-weight: 500;
}

.crawl-inputs, .search-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* 체크박스 스타일 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.checkbox-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.checkbox-label span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

input[type="text"],
input[type="number"],
select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    flex: 1;
    min-width: 150px;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #764ba2;
    color: white;
}

.btn-secondary:hover {
    background: #653a8a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.3);
}

.btn-tertiary {
    background: #6c757d;
    color: white;
}

.btn-tertiary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

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

.status-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stats {
    text-align: center;
    margin: 20px 0;
    font-size: 1.1em;
    color: #666;
}

#totalCount {
    font-weight: bold;
    color: #667eea;
    font-size: 1.3em;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #667eea;
    display: none;
}

.casting-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.casting-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.casting-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.casting-card.expired {
    opacity: 0.5;
    background: #f8f9fa;
    border-color: #dee2e6;
}

.casting-card.expired:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-color: #dee2e6;
}

.casting-card.expired .casting-title {
    text-decoration: line-through;
    color: #6c757d;
}

.casting-card.expired .casting-title-link {
    text-decoration: line-through;
    color: #6c757d;
}

.casting-card.expired .casting-title-link:hover {
    color: #6c757d;
}

/* 신규/급구 카드 강조 */
.casting-card.new-post {
    border-left: 4px solid #4CAF50;
    background: linear-gradient(to right, #f0fff4 0%, white 10%);
}

.casting-card.urgent-post {
    border-left: 4px solid #ff4444;
    background: linear-gradient(to right, #fff5f5 0%, white 10%);
}

/* 북마크 버튼 */
.bookmark-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s;
    padding: 5px;
    line-height: 1;
}

.bookmark-btn:hover {
    transform: scale(1.2);
}

.bookmark-btn.bookmarked {
    color: #FFD700;
}

.bookmark-btn:not(.bookmarked) {
    color: #ddd;
}

.bookmark-btn:not(.bookmarked):hover {
    color: #FFC107;
}

.casting-header {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.casting-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.casting-gender {
    display: inline-block;
    background: #764ba2;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.casting-deadline {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.casting-deadline.expired {
    background: #6c757d;
}

/* D-Day 배지 스타일 */
.casting-deadline.urgent {
    background: #ff4444;
    animation: pulse 1.5s infinite;
}

.casting-deadline.soon {
    background: #ff9800;
}

/* 상태 배지 */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 5px;
}

.status-badge.new {
    background: #4CAF50;
    color: white;
}

.status-badge.urgent {
    background: #ff4444;
    color: white;
    animation: pulse 1.5s infinite;
}

.status-badge.bookmarked {
    background: #FFD700;
    color: #333;
}

.status-badge.recent-viewed {
    background: #2196F3;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 카드 정보 영역 강화 */
.casting-info-detail {
    margin: 15px 0;
    padding: 12px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.casting-info-row {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.casting-info-row .icon {
    margin-right: 8px;
    font-size: 16px;
}

.casting-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

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

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

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

.casting-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.casting-title-link {
    text-decoration: none;
    color: #333;
    display: block;
    transition: color 0.3s;
}

.casting-title-link:hover {
    color: #667eea;
    text-decoration: underline;
}

.casting-info {
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
}

.casting-label {
    font-weight: 600;
    color: #764ba2;
    min-width: 70px;
    margin-right: 10px;
}

.casting-value {
    flex: 1;
    word-break: break-word;
}

.casting-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.casting-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #888;
    flex-wrap: wrap;
}

.view-original-btn {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.view-original-btn:hover {
    transform: translateX(3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    header p.subtitle {
        font-size: 0.9em;
    }

    .tabs {
        gap: 5px;
        margin: 15px auto;
    }

    .tab-btn {
        padding: 10px 8px;
        font-size: 0;
        min-width: auto;
    }

    .tab-btn::before {
        content: attr(data-icon);
        display: inline-block;
        font-size: 18px;
        margin: 0;
    }

    .main-search-bar {
        margin: 20px auto 30px;
        max-width: 100%;
    }

    .main-search-bar input {
        padding: 14px 16px;
        font-size: 14px;
    }

    .main-search-bar .search-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    .main-search-bar .search-btn span {
        display: inline;
    }

    .controls {
        grid-template-columns: 1fr;
    }

    .casting-list {
        grid-template-columns: 1fr;
    }

    .crawl-inputs, .search-inputs {
        flex-direction: column;
    }

    input[type="text"],
    input[type="number"],
    select,
    .btn {
        width: 100%;
    }

    .casting-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-original-btn {
        width: 100%;
        text-align: center;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* 페이징 스타일 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    border: 2px solid #ddd;
    background: white;
    color: #333;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 40px;
}

.page-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn:disabled {
    background: #f0f0f0;
    color: #ccc;
    border-color: #e0e0e0;
    cursor: not-allowed;
}

.page-dots {
    padding: 0 8px;
    color: #999;
    font-weight: bold;
}

/* ========== 알림 설정 패널 ========== */
.notification-settings {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.notification-settings h2 {
    color: #333;
    font-size: 2em;
    margin-bottom: 10px;
    text-align: center;
}

.notification-settings .description {
    text-align: center;
    color: #666;
    font-size: 1em;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* 설정 섹션 */
.settings-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h3 {
    color: #333;
    font-size: 1.3em;
    font-weight: 600;
}

/* ON/OFF 스위치 */
.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    background-color: #ccc;
    border-radius: 30px;
    transition: 0.3s;
    margin-right: 12px;
}

.slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked + .slider {
    background-color: #667eea;
}

.switch input:checked + .slider:before {
    transform: translateX(30px);
}

.switch-label {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.hint {
    font-size: 0.85em;
    color: #888;
    margin-top: 8px;
    line-height: 1.4;
}

/* 라디오 그룹 */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 18px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
}

.radio-label:hover {
    border-color: #667eea;
    background: #f0f3ff;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    accent-color: #667eea;
}

/* :has() 선택자 (최신 브라우저) */
.radio-label:has(input:checked) {
    background: #667eea !important;
    border-color: #667eea !important;
    color: white !important;
}

.radio-label:has(input:checked) span {
    color: white !important;
    font-weight: 600;
}

/* .selected 클래스 (구형 브라우저 폴백) */
.radio-label.selected {
    background: #667eea !important;
    border-color: #667eea !important;
    color: white !important;
}

.radio-label.selected span {
    color: white !important;
    font-weight: 600;
}

/* 체크박스 그룹 */
.checkbox-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9em;
}

.checkbox-label:hover {
    border-color: #667eea;
    background: #f0f3ff;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 6px;
    cursor: pointer;
    accent-color: #667eea;
}

/* :has() 선택자 (최신 브라우저) */
.checkbox-label:has(input:checked) {
    background: #667eea !important;
    border-color: #667eea !important;
    color: white !important;
}

.checkbox-label:has(input:checked) span {
    color: white !important;
    font-weight: 600;
}

/* .selected 클래스 (구형 브라우저 폴백) */
.checkbox-label.selected {
    background: #667eea !important;
    border-color: #667eea !important;
    color: white !important;
}

.checkbox-label.selected span {
    color: white !important;
    font-weight: 600;
}

/* 나이 입력 */
.input-with-unit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-unit input[type="number"] {
    width: 120px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.2s;
}

.input-with-unit input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.input-with-unit .unit {
    color: #666;
    font-size: 1em;
}

/* 지역 선택 */
.location-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.location-select:focus {
    outline: none;
    border-color: #667eea;
}

.location-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    min-height: 36px;
}

.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 0.9em;
}

.location-tag .remove-tag {
    cursor: pointer;
    font-weight: bold;
    margin-left: 4px;
    opacity: 0.8;
}

.location-tag .remove-tag:hover {
    opacity: 1;
}

/* AI 분석 카드 */
.ai-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.insight-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.insight-label {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 8px;
}

.insight-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.insight-confidence {
    font-size: 0.8em;
    color: #667eea;
}

.ai-note {
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

/* 저장 버튼 */
.settings-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0 20px;
}

.settings-actions .btn {
    padding: 12px 30px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.settings-actions .btn-primary {
    background: #667eea;
    color: white;
}

.settings-actions .btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.settings-actions .btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.settings-actions .btn-secondary:hover {
    background: #f0f3ff;
}

/* 설정 요약 */
.summary-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.summary-label {
    color: #666;
    font-size: 0.95em;
}

.summary-value {
    color: #333;
    font-weight: 600;
    text-align: right;
}

/* 매칭 배지 (게시글 카드용) */
.match-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 8px;
}

.match-badge[data-score="100"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.match-badge[data-score^="9"] {
    background: #4caf50;
    color: white;
}

.match-badge[data-score^="8"] {
    background: #ff9800;
    color: white;
}

.match-badge .match-score {
    font-weight: bold;
}

.match-reasons {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
    line-height: 1.6;
}

.match-reasons div {
    margin-bottom: 4px;
}

.match-reasons div:before {
    content: "✓ ";
    color: #4caf50;
    font-weight: bold;
    margin-right: 4px;
}

/* 매칭 점수 배지 스타일 */
.status-badge.match-perfect {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.status-badge.match-excellent {
    background: #4caf50;
    color: white;
    font-weight: 600;
}

.status-badge.match-good {
    background: #ff9800;
    color: white;
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.casting-info-row.match-reasons {
    background: #f0f3ff;
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 5px;
}

.casting-info-row.match-reasons .info-value {
    color: #667eea;
    font-weight: 500;
}

/* 반응형 */
@media (max-width: 768px) {
    .notification-settings {
        padding: 10px;
    }

    .settings-section {
        padding: 15px;
    }

    .radio-group,
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }

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

    .settings-actions .btn {
        width: 100%;
    }

    .ai-insights {
        grid-template-columns: 1fr;
    }
}

/* ========== AI 오디션 도우미 모달 스타일 ========== */

.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.ai-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

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

.ai-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
}

.ai-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.ai-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-modal-close:hover {
    color: #333;
}

.ai-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* 로딩 스피너 */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-spinner p {
    margin-top: 20px;
    color: #666;
    font-size: 16px;
}

/* AI 탭 메뉴 */
.ai-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.ai-tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.ai-tab-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.ai-tab-btn.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    background: white;
}

/* 탭 콘텐츠 */
.ai-tab-content {
    position: relative;
}

.ai-tab-panel {
    display: none;
    padding: 25px;
    animation: fadeInContent 0.3s ease;
}

.ai-tab-panel.active {
    display: block;
}

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

/* 체크리스트 섹션 */
.checklist-section {
    margin-bottom: 25px;
}

.checklist-section h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.checklist input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checklist label {
    cursor: pointer;
    line-height: 1.5;
    color: #444;
}

.checklist.warning li {
    background: #fff3cd;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
}

.checklist-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
}

/* 역할 분석 섹션 */
.role-section {
    margin-bottom: 30px;
}

.role-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.role-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.summary-line {
    margin: 8px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

.summary-line:first-child {
    font-weight: 600;
    color: #333;
    font-size: 17px;
}

.acting-points {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.acting-point {
    display: flex;
    gap: 15px;
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.point-number {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.point-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.point-detail {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

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

.references-list li {
    padding: 12px 15px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 3px solid #9C27B0;
}

/* 준비 팁 섹션 */
.tips-section {
    margin-bottom: 30px;
}

.tips-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.tips-section h4 {
    font-size: 16px;
    margin: 15px 0 10px 0;
    color: #444;
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

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

.tips-list li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    line-height: 1.6;
}

.tips-list strong {
    color: #333;
    display: inline-block;
    min-width: 80px;
}

.duration-guide {
    margin-top: 15px;
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
}

.duration-guide ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.duration-guide li {
    padding: 5px 0;
    color: #1976d2;
}

.photo-guide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.guide-required,
.guide-avoid {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.guide-required {
    border-left: 4px solid #4CAF50;
}

.guide-avoid {
    border-left: 4px solid #f44336;
}

.guide-required h4,
.guide-avoid h4 {
    margin-top: 0;
}

.guide-required ol,
.guide-avoid ul {
    padding-left: 20px;
    margin: 10px 0 0 0;
}

.application-template {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.template-text {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    margin-bottom: 15px;
    overflow-x: auto;
}

.application-tips ul {
    list-style: none;
    padding: 0;
}

.application-tips li {
    padding: 8px 12px;
    margin-bottom: 6px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #FF9800;
}

/* 버튼 스타일 추가 */
.action-btn-ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 에러 메시지 */
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #f44336;
}

.error-message p:first-child {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .ai-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .ai-modal-header {
        padding: 15px 20px;
    }

    .ai-modal-header h2 {
        font-size: 20px;
    }

    .ai-tab-btn {
        padding: 12px 10px;
        font-size: 14px;
    }

    .ai-tab-panel {
        padding: 20px 15px;
    }

    .photo-guide {
        grid-template-columns: 1fr;
    }

    .acting-point {
        flex-direction: column;
        gap: 10px;
    }

    .point-number {
        font-size: 24px;
    }

    .keywords {
        gap: 8px;
    }

    .keyword-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ========== 빠른 필터 바 스타일 ========== */

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

.btn-toggle-filter {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-toggle-filter.active {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.quick-filter-bar {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid #667eea;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 15px;
    }
    to {
        opacity: 1;
        max-height: 500px;
        padding: 15px;
    }
}

.filter-label {
    color: #667eea;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
    display: block;
}

.filter-inputs {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    color: #333;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.filter-item input[type="number"],
.filter-item select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 80px;
    transition: all 0.3s;
}

.filter-item input[type="number"]:focus,
.filter-item select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-item span {
    color: #333;
    font-size: 13px;
}

.btn-quick-apply,
.btn-quick-clear {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-quick-apply {
    background: #667eea;
    color: white;
}

.btn-quick-apply:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-quick-clear {
    background: white;
    color: #666;
    border: 2px solid #ddd;
}

.btn-quick-clear:hover {
    background: #f0f0f0;
    border-color: #999;
}

.filter-status {
    margin-top: 12px;
    padding: 10px 15px;
    background: #e3f2fd;
    border-radius: 6px;
    color: #1976d2;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-status .status-icon {
    font-size: 18px;
}

.filter-status .status-text {
    font-weight: 500;
}

/* ========== 공고 카드 버튼 스타일 ========== */

.casting-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.action-btn-primary {
    background: #4CAF50;
    color: white;
}

.action-btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.action-btn-save {
    background: #FF9800;
    color: white;
}

.action-btn-save:hover {
    background: #e68900;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.action-btn-save.saved {
    background: #4CAF50;
}

.action-btn-copy {
    background: #2196F3;
    color: white;
}

.action-btn-copy:hover {
    background: #0b7dda;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* ========== 요약 복사 모달 스타일 ========== */

.copy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.copy-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.copy-modal h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    text-align: center;
}

.copy-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.copy-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.copy-option:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(5px);
}

.option-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.option-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.option-desc {
    font-size: 13px;
    color: #666;
}

.copy-modal-close {
    width: 100%;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-modal-close:hover {
    background: #e0e0e0;
}

/* ========== 무한 스크롤 UI ========== */

.infinite-scroll-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 15px;
}

.infinite-scroll-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.infinite-scroll-loading p {
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
}

.infinite-scroll-end {
    text-align: center;
    padding: 30px 20px;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #ddd;
}

.infinite-scroll-end p {
    color: #666;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* 마지막으로 본 항목 표시 */
.last-viewed-indicator {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    animation: slideInFromTop 0.3s ease;
    transition: opacity 0.3s ease;
}

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

/* ========== 모바일 최적화 ========== */

@media (max-width: 768px) {
    .quick-filter-bar {
        padding: 12px 15px;
    }

    .filter-inputs {
        gap: 10px;
    }

    .filter-item {
        flex: 1;
        min-width: 45%;
    }

    .filter-item input[type="number"],
    .filter-item select {
        width: 100%;
        min-width: auto;
    }

    .btn-quick-apply,
    .btn-quick-clear {
        flex: 1;
        min-width: 45%;
    }

    .casting-card-actions {
        gap: 6px;
    }

    .action-btn {
        min-width: 48%;
        font-size: 12px;
        padding: 8px 10px;
    }

    .copy-modal {
        width: 95%;
        padding: 20px;
    }

    .option-icon {
        font-size: 24px;
    }

    .option-title {
        font-size: 14px;
    }

    .option-desc {
        font-size: 12px;
    }
}
