/* ===== 기본 스타일 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* ===== 컨테이너 ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* ===== 헤더 ===== */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #2d2d2d, #3d3d3d);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: #888;
    font-size: 1.1rem;
}

/* ===== 네비게이션 탭 ===== */
.nav-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 12px 24px;
    background: #3d3d3d;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab:hover {
    background: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.nav-tab.active {
    background: #ff6b6b;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* ===== 탭 컨텐츠 ===== */
.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 검색 섹션 ===== */
.search-section {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    background: #3d3d3d;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.search-input:focus {
    background: #4d4d4d;
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.search-btn, .settings-btn {
    padding: 15px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.settings-btn {
    background: #3d3d3d;
    padding: 15px 20px;
    font-size: 18px;
}

.search-btn:hover, .settings-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.settings-btn:hover {
    background: #ff6b6b;
}

.filter-section {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-section select {
    padding: 12px 16px;
    background: #3d3d3d;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filter-section select:focus {
    background: #4d4d4d;
    outline: none;
}

/* ===== 고급검색 페이지 ===== */
.advanced-search-page {
    max-width: 900px;
    margin: 0 auto;
}

.advanced-form {
    background: #2d2d2d;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #ff6b6b;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;
}

.form-input, .form-select {
    width: 100%;
    padding: 15px 18px;
    border: none;
    border-radius: 12px;
    background: #3d3d3d;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus, .form-select:focus {
    background: #4d4d4d;
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* ===== 태그 입력 ===== */
.tags-input-container {
    position: relative;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 40px;
    align-items: flex-start;
    align-content: flex-start;
}

.selected-tag {
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* ===== 개선된 로그인 모달 스타일 ===== */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.login-form {
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    max-width: 420px;
    width: 90%;
    text-align: center;
    border: 1px solid #3d3d3d;
    position: relative;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
}

.login-header h2 {
    color: #ff6b6b;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.login-header p {
    color: #aaa;
    margin-bottom: 30px;
    font-size: 16px;
}

.login-fields {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    color: #ff6b6b;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.login-input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #3d3d3d;
    border-radius: 12px;
    background: #1a1a1a;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.login-input:focus {
    background: #2d2d2d;
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
}

.login-input::placeholder {
    color: #666;
}

.login-btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff4444);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-help {
    margin-top: 25px;
}

.login-help details {
    text-align: left;
}

.login-help summary {
    color: #888;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s ease;
    text-align: center;
}

.login-help summary:hover {
    background: #2d2d2d;
    color: #ff6b6b;
}

.account-list {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid #3d3d3d;
}

.account-item {
    color: #ccc;
    font-size: 13px;
    margin-bottom: 8px;
    padding: 8px;
    background: #2d2d2d;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-item:last-child {
    margin-bottom: 0;
}

.account-item strong {
    color: #ff6b6b;
}

/* 로딩 상태 */
.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-loading {
    display: inline-block;
}

/* 에러 메시지 스타일 */
.login-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 사용자 정보 표시 */
.user-info {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ccc;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
}

.user-info button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.user-info button:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

/* 권한 제한 스타일 */
.permission-restricted {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.permission-restricted::after {
    content: '권한 없음';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(244, 67, 54, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.permission-restricted:hover::after {
    opacity: 1;
}

/* 반응형 */
@media (max-width: 768px) {
    .login-form {
        padding: 30px 25px;
        margin: 20px;
    }
    
    .user-info {
        position: relative;
        top: auto;
        right: auto;
        justify-content: center;
        margin-top: 15px;
        padding: 10px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 8px;
    }
    
    .user-info span {
        font-size: 12px;
    }
}


@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px) scale(0.8); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.tag-text {
    font-weight: 500;
}

.tag-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
    padding: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
}

.tag-remove:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ===== 태그 자동완성 ===== */
.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2d2d2d;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    border: 1px solid #3d3d3d;
}

.suggestion-item {
    padding: 12px 18px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #3d3d3d;
}

.suggestion-item:hover {
    background: #3d3d3d;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* ===== 액션 버튼 ===== */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.action-btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.action-btn.secondary {
    background: #3d3d3d;
    color: #fff;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.action-btn.primary:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* ===== 섹션 헤더 ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    color: #ff6b6b;
    font-size: 2rem;
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== 결과 그리드 ===== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

/* ===== 결과 아이템 ===== */
.result-item {
    background: #2d2d2d;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    background: #3d3d3d;
}

/* ===== 즐겨찾기 버튼 ===== */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.favorite-btn.favorited {
    background: rgba(255, 107, 107, 0.9);
}

/* ===== 아이템 썸네일 ===== */
.item-thumb {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.result-item:hover .item-thumb img {
    transform: scale(1.05);
}

.item-date {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* ===== 아이템 정보 ===== */
.item-info {
    padding: 20px;
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: #3d3d3d;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tag:hover {
    background: #ff6b6b;
    border-color: #ff6b6b;
    transform: scale(1.05);
}

.tag-more {
    background: #4d4d4d;
    color: #888;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* ===== 빈 상태 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-title {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
}

.empty-message {
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* ===== 로딩 ===== */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #ff6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #3d3d3d;
    border-top: 2px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== 에러 ===== */
.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* ===== 페이지네이션 ===== */
.page-btn {
    padding: 10px 15px;
    margin: 0 5px;
    background: #3d3d3d;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.page-btn:hover {
    background: #ff6b6b;
    transform: translateY(-1px);
}

.page-btn.active {
    background: #ff6b6b;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.page-dots {
    padding: 10px 5px;
    color: #888;
}

.page-info {
    color: #888;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

/* ===== 로그인 모달 ===== */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-form {
    background: #2d2d2d;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.login-form h2 {
    color: #ff6b6b;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.login-input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: none;
    border-radius: 8px;
    background: #3d3d3d;
    color: #fff;
    font-size: 16px;
}

.login-input:focus {
    background: #4d4d4d;
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.login-btn:hover {
    background: #ff5252;
}

/* ===== 상세보기 모달 ===== */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    overflow-y: auto;
}

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #3d3d3d;
}

.detail-title {
    color: #ff6b6b;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: #3d3d3d;
}

.detail-content {
    flex: 1;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 20px 0;
    overflow: hidden;
}

@media (max-width: 768px) {
    .detail-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===== 상세 정보 패널 ===== */
.detail-info {
    background: #2d2d2d;
    padding: 25px;
    border-radius: 15px;
    height: fit-content;
}

.detail-thumbnail {
    width: 100%;
    margin-bottom: 20px;
}

.detail-thumbnail img {
    width: 100%;
    border-radius: 10px;
}

.detail-meta {
    margin-bottom: 25px;
}

.meta-row {
    display: flex;
    margin-bottom: 10px;
    align-items: flex-start;
}

.meta-label {
    color: #ff6b6b;
    font-weight: 600;
    width: 80px;
    flex-shrink: 0;
}

.meta-value {
    color: #fff;
    flex: 1;
    word-break: break-word;
}

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.favorite-action, .read-action {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.favorite-action {
    background: #ff6b6b;
    color: white;
}

.read-action {
    background: #3d3d3d;
    color: #fff;
}

.favorite-action:hover, .read-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== 이미지 뷰어 ===== */
.image-viewer {
    background: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.viewer-header {
    background: #2d2d2d;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-info {
    color: #fff;
    font-weight: 600;
}

.viewer-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 8px 15px;
    background: #3d3d3d;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.control-btn:hover {
    background: #ff6b6b;
}

.control-btn.active {
    background: #ff6b6b;
}

.image-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.current-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nav-prev, .nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.nav-prev {
    left: 20px;
}

.nav-next {
    right: 20px;
}

.nav-prev:hover, .nav-next:hover {
    background: rgba(255, 107, 107, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.thumbnails {
    background: #2d2d2d;
    padding: 15px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    max-height: 120px;
}

.thumbnails img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.thumbnails img:hover,
.thumbnails img.active {
    opacity: 1;
}

/* ===== 알림 ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2d2d2d;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.success {
    border-left: 4px solid #4caf50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification.warning {
    border-left: 4px solid #ff9800;
}

.notification.info {
    border-left: 4px solid #2196f3;
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .advanced-form {
        padding: 25px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .nav-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-tab {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .advanced-form {
        padding: 20px;
    }
}

/* ===== 전체화면 모달 ===== */
.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10001;
}

#fullscreenImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.login-form {
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    max-width: 420px;
    width: 90%;
    text-align: center;
    border: 1px solid #3d3d3d;
    position: relative;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
}

.login-header h2 {
    color: #ff6b6b;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.login-header p {
    color: #aaa;
    margin-bottom: 30px;
    font-size: 16px;
}

.login-fields {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    color: #ff6b6b;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.login-input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #3d3d3d;
    border-radius: 12px;
    background: #1a1a1a;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.login-input:focus {
    background: #2d2d2d;
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
}

.login-input::placeholder {
    color: #666;
}

.login-btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff4444);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-help {
    margin-top: 25px;
}

.login-help details {
    text-align: left;
}

.login-help summary {
    color: #888;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s ease;
    text-align: center;
}

.login-help summary:hover {
    background: #2d2d2d;
    color: #ff6b6b;
}

.account-list {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid #3d3d3d;
}

.account-item {
    color: #ccc;
    font-size: 13px;
    margin-bottom: 8px;
    padding: 8px;
    background: #2d2d2d;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-item:last-child {
    margin-bottom: 0;
}

.account-item strong {
    color: #ff6b6b;
}

/* 로딩 상태 */
.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-loading {
    display: inline-block;
}

/* 에러 메시지 스타일 */
.login-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 사용자 정보 표시 */
.user-info {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ccc;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
}

.user-info button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.user-info button:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

/* 반응형 */
@media (max-width: 768px) {
    .login-form {
        padding: 30px 25px;
        margin: 20px;
    }
    
    .user-info {
        position: relative;
        top: auto;
        right: auto;
        justify-content: center;
        margin-top: 15px;
        padding: 10px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 8px;
    }
    
    .user-info span {
        font-size: 12px;
    }
}


/* ===== 태그 색상 분류 스타일 ===== */
.tag-female {
    background: #ff6b6b !important;
    color: white !important;
    border-color: #ff6b6b !important;
}

.tag-female:hover {
    background: #ff5252 !important;
    border-color: #ff5252 !important;
    transform: scale(1.05) !important;
}

.tag-male {
    background: #2196F3 !important;
    color: white !important;
    border-color: #2196F3 !important;
}

.tag-male:hover {
    background: #1976D2 !important;
    border-color: #1976D2 !important;
    transform: scale(1.05) !important;
}

.tag-general {
    background: #666 !important;
    color: #fff !important;
    border-color: #666 !important;
}

.tag-general:hover {
    background: #777 !important;
    border-color: #777 !important;
    transform: scale(1.05) !important;
}

.tag-more {
    background: #4d4d4d !important;
    color: #888 !important;
    cursor: default !important;
    border-color: #4d4d4d !important;
}

.tag-more:hover {
    background: #4d4d4d !important;
    border-color: #4d4d4d !important;
    transform: none !important;
}

/* 상세보기 모드에서도 동일한 색상 적용 */
.detailed-view .tag-female {
    background: #ff6b6b !important;
}

.detailed-view .tag-male {
    background: #2196F3 !important;
}

.detailed-view .tag-general {
    background: #666 !important;
}