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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: calc(100vh - 40px);
    background: white;
    border-radius: 20px;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 사이드바 */
.sidebar {
    width: 280px;
    background: transparent;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: calc(100vh - 40px);
    overflow-y: auto;
    z-index: 100;
    justify-content: center;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.developer-info {
    margin-top: auto;
    text-align: center;
    font-size: 12px;
    color: #6c757d;
    padding-top: 20px;
}

.developer-info a {
    color: #0064ff;
    text-decoration: none;
}

.developer-info a:hover {
    text-decoration: underline;
}

.developer-info p {
    margin-top: 4px;
}

/* 검색 섹션 */
.search-section {
    width: 100%;
    max-width: 240px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    position: relative;
}

.search-input-container {
    position: relative;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: border-color 0.2s;
    overflow: hidden;
    width: 100%;
}

.search-input-container:focus-within {
    border-color: #0064ff;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    background: transparent;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #0064ff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.search-btn:hover {
    background: #0052cc;
    transform: translateY(-1px);
}

.filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.filter-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.search-buttons {
    display: flex;
    gap: 8px;
    width: 100%;
}

.filter-container {
    position: relative;
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    min-width: 200px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.filter-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f8f9fa;
}

.filter-option:last-child {
    border-bottom: none;
}

.filter-option:hover {
    background: #f8f9fa;
}

.filter-option.selected {
    background: #0064ff;
    color: white;
}

/* 홈 버튼 스타일 */
.home-section {
    width: 100%;
    max-width: 240px;
}

.home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    background: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    width: 100%;
}

.home-btn:hover {
    background: #218838;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 240px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: #495057;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 100%;
    justify-content: center;
}

.nav-btn::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;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    background: #e9ecef;
    color: #212529;
    transform: translateY(-1px);
}

.upload-btn {
    background: #0064ff;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 100, 255, 0.3);
}

.upload-btn:hover {
    background: #0052cc;
    color: white;
    box-shadow: 0 6px 16px rgba(0, 100, 255, 0.4);
}

.manage-btn {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.manage-btn:hover {
    background: #5a6268;
    color: white;
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
}

.login-btn, .logout-btn {
    background: #212529;
    color: white;
    box-shadow: 0 4px 12px rgba(33, 37, 41, 0.3);
}

.login-btn:hover, .logout-btn:hover {
    background: #343a40;
    color: white;
    box-shadow: 0 6px 16px rgba(33, 37, 41, 0.4);
}

/* 메인 콘텐츠 */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: white;
    position: relative;
    margin-left: 280px;
    height: 100vh;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e9ecef, transparent);
}

/* 캐릭터 그리드 */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 0;
    min-height: 400px;
}

.character-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
    position: relative;
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0064ff, #28a745, #ffc107, #dc3545);
    opacity: 0;
    transition: opacity 0.3s;
}

.character-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.character-card:hover::before {
    opacity: 1;
}

.character-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.character-image img:hover {
    transform: scale(1.05);
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #6c757d;
    font-size: 14px;
    background: #f8f9fa;
}

.character-info {
    padding: 16px;
}

.twitter-id {
    font-size: 12px;
    color: #0064ff;
    font-weight: 600;
    margin-bottom: 4px;
}

.twitter-link {
    color: #0064ff;
    text-decoration: none;
    transition: color 0.2s;
}

.twitter-link:hover {
    color: #0052cc;
    text-decoration: underline;
}

.character-name {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.character-species {
    font-size: 12px;
    color: #6c757d;
}

.character-actions {
    padding: 0 16px 16px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    background: #0064ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background: #0052cc;
}

/* 빈 상태 */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    min-height: 400px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 28px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 16px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 32px;
    font-size: 18px;
    line-height: 1.5;
}

.upload-first-btn, .login-first-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: #0064ff;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 100, 255, 0.3);
}

.upload-first-btn:hover, .login-first-btn:hover {
    background: #0052cc;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 100, 255, 0.4);
}

/* 수정 페이지 스타일 */
.edit-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.edit-header {
    text-align: center;
    margin-bottom: 40px;
}

.edit-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.edit-header p {
    color: #6c757d;
}

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.current-image-section {
    margin-bottom: 20px;
}

.current-image-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
}

.current-image {
    width: 200px;
    max-height: 200px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.current-image img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}

.edit-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* 업로드 페이지 */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.upload-header {
    text-align: center;
    margin-bottom: 40px;
}

.upload-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.upload-header p {
    color: #6c757d;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0064ff;
}

.file-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: #0064ff;
    background: #f8f9ff;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #6c757d;
}

.upload-placeholder svg {
    color: #0064ff;
}

.upload-placeholder p {
    margin: 0;
    font-size: 14px;
}

.file-info {
    font-size: 12px !important;
    color: #adb5bd !important;
}

.preview-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

.preview-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0064ff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background: #0052cc;
}

.cancel-btn {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.cancel-btn:hover {
    background: #5a6268;
    color: white;
}

/* 업로드 상태 */
.upload-status {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.status-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #0064ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 에러 페이지 */
.error-container {
    text-align: center;
    padding: 60px 20px;
}

.error-container h1 {
    font-size: 32px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 16px;
}

.error-container p {
    color: #6c757d;
    font-size: 16px;
}

/* 메시지 배너 */
.message-banner {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #856404;
    font-size: 14px;
}

.message-content svg {
    color: #f39c12;
    flex-shrink: 0;
}

/* 캐릭터 상세 페이지 */
.character-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.character-detail-header {
    margin-bottom: 30px;
    position: relative;
}

.back-button {
    margin-bottom: 20px;
}

.header-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 12px;
}

.download-btn-small {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #0064ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 100, 255, 0.3);
}

.download-btn-small:hover {
    background: #0052cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 100, 255, 0.4);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: #0064ff;
}

.character-title {
    font-size: 32px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 12px;
}

.character-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.twitter-id {
    color: #0064ff;
    font-weight: 600;
    font-size: 16px;
}

.species-badge {
    background: #e9ecef;
    color: #495057;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.character-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.character-image-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-image-large {
    width: 100%;
    max-width: 800px;
    max-height: 70vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-image-large img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.placeholder-image-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #6c757d;
    text-align: center;
}

.placeholder-image-large svg {
    margin-bottom: 16px;
    color: #adb5bd;
}

.placeholder-image-large p {
    margin: 0;
    font-size: 14px;
}

.character-info-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 600px;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.info-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    gap: 16px;
}

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

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

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

.info-item span {
    color: #212529;
    font-size: 14px;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.download-btn-large, .edit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.download-btn-large {
    background: #0064ff;
    color: white;
    flex: 1;
}

.download-btn-large:hover {
    background: #0052cc;
}

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

.edit-btn:hover {
    background: #5a6268;
}

/* 캐릭터 관리 페이지 */
.manage-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.manage-header {
    text-align: center;
    margin-bottom: 40px;
}

.manage-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.manage-header p {
    color: #6c757d;
    font-size: 16px;
}

.error-banner {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #721c24;
    font-size: 14px;
}

.error-content svg {
    color: #dc3545;
    flex-shrink: 0;
}

.manage-actions {
    margin-bottom: 30px;
    text-align: center;
}

.upload-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0064ff;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.upload-new-btn:hover {
    background: #0052cc;
    color: white;
}

.manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.manage-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.2s, box-shadow 0.2s;
}

.manage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.manage-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.manage-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manage-info {
    padding: 20px;
}

.manage-info .character-name {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
}

.character-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upload-date {
    font-size: 12px;
    color: #6c757d;
}

.manage-actions-card {
    padding: 0 20px 20px;
    display: flex;
    gap: 8px;
}

.view-btn, .download-btn, .delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.view-btn {
    background: #0064ff;
    color: white;
}

.view-btn:hover {
    background: #0052cc;
}

.download-btn {
    background: #28a745;
    color: white;
}

.download-btn:hover {
    background: #218838;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

.empty-manage {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-manage .empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.empty-manage h3 {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.empty-manage p {
    color: #6c757d;
    margin-bottom: 24px;
}

/* 검색 가능한 종족 드롭다운 */
.species-dropdown-wrapper {
    position: relative;
    width: 100%;
}

.species-dropdown-button {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #495057;
}

.species-dropdown-button:hover {
    border-color: #0064ff;
}

.species-dropdown-button.active {
    border-color: #0064ff;
    box-shadow: 0 0 0 3px rgba(0, 100, 255, 0.1);
}

.dropdown-arrow {
    transition: transform 0.2s;
    color: #6c757d;
}

.species-dropdown-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

.species-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    max-height: 300px;
    overflow: hidden;
}

.species-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.species-search-input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    outline: none;
}

.species-search-input:focus {
    border-bottom-color: #0064ff;
}

.species-options-list {
    max-height: 200px;
    overflow-y: auto;
}

.species-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    color: #495057;
}

.species-option:hover {
    background-color: #f8f9fa;
}

.species-option.selected {
    background-color: #e3f2fd;
    color: #0064ff;
    font-weight: 500;
}

.species-option.no-results {
    color: #6c757d;
    font-style: italic;
    cursor: default;
}

.species-option.no-results:hover {
    background-color: transparent;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .app-container {
        margin: 10px;
        border-radius: 16px;
    }
    
    .sidebar {
        width: 240px;
        padding: 24px 16px;
    }
    
    .main-content {
        padding: 30px;
        margin-left: 240px;
    }
    
    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        margin: 5px;
        border-radius: 12px;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        padding: 20px;
        position: static;
        height: auto;
        overflow-y: visible;
        justify-content: flex-start;
    }
    
    .sidebar-content {
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
        border-radius: 16px;
        padding: 20px;
        max-width: 300px;
    }
    
    .home-section {
        max-width: 300px;
    }
    
    .main-content {
        margin-left: 0;
        height: auto;
    }
    
    .nav-section {
        margin-top: 0;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .upload-container {
        padding: 10px;
    }
    
    /* 캐릭터 상세 페이지 반응형 */
    .character-content {
        gap: 24px;
    }
    
    .character-image-large {
        max-width: 100%;
        max-height: 50vh;
    }
    
    .character-title {
        font-size: 24px;
    }
    
    .header-actions {
        position: static;
        margin-bottom: 16px;
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .download-btn-large, .edit-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* 관리 페이지 반응형 */
    .manage-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .manage-actions-card {
        flex-direction: column;
    }
    
    .view-btn, .download-btn, .delete-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .app-container {
        margin: 0;
        border-radius: 0;
        height: auto;
    }
    
    .sidebar {
        padding: 16px;
        position: static;
        height: auto;
    }
    
    .sidebar-content {
        border-radius: 12px;
        padding: 16px;
    }
    
    .main-content {
        padding: 16px;
        margin-left: 0;
        height: auto;
    }
    
    .character-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
} 

/* 반응형 디자인을 위한 미디어 쿼리 */
@media (max-width: 768px) {
    body {
        height: auto;
        overflow-y: auto;
    }

    .app-container {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 0;
        min-width: unset;
        max-width: unset;
    }

    .sidebar-background {
        width: 100%;
        max-height: unset;
        border-radius: 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        padding: 15px;
    }

    .sidebar-content {
        flex-direction: column;
        height: auto;
        padding: 0;
        gap: 15px;
        align-items: center;
    }

    .nav-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        /* width: 100%; */
    }
    
    .nav-links .btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .developer-info {
        margin-top: 0;
        padding-top: 10px;
        border-top: 1px solid #eee;
        width: 100%;
    }

    .main-content {
        margin-left: 0;
        flex-grow: 1;
        padding: 20px;
        height: auto;
        overflow-y: visible;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .search-container, .filter-sort-container {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .search-form {
        width: 100%;
    }
    
    .species-filter-container {
        width: 100%;
    }

    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .upload-form, .edit-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-container {
        flex-direction: column;
    }

    .image-preview-container {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .form-fields {
        width: 100%;
    }

    .detail-container {
        flex-direction: column;
    }
    
    .detail-image-container {
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .detail-info {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .character-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-links {
        gap: 8px;
    }

    .nav-links .btn {
        flex-grow: 1;
    }
} 