/* CSS 변수 정의 */
:root {
    /* 다크 모드 (기본) */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #333;
    --text-primary: #ffffff;
    --text-secondary: #aaa;
    --text-muted: #999;
    --border-color: #333;
    --accent-color: #7289da;
    --accent-hover: #5f73bc;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --modal-bg: rgba(0, 0, 0, 0.8);
    --overlay-bg: rgba(0, 0, 0, 0.5);
}

/* 라이트 모드 */
:root.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --accent-color: #7289da;
    --accent-hover: #5f73bc;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --modal-bg: rgba(0, 0, 0, 0.5);
    --overlay-bg: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 헤더 및 네비게이션 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 2px;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 300;
    transition: opacity 0.3s ease, color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    opacity: 0.7;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-primary);
}

/* 소셜 링크 */
.social-link {
    background: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
}

.social-link:hover {
    background-color: var(--bg-secondary);
    transform: scale(1.1);
    color: var(--text-primary);
    opacity: 0.8;
}

.social-link:active {
    transform: scale(0.95);
}

/* X 아이콘 스타일 */
.x-icon {
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Times New Roman', serif;
    line-height: 1;
}

/* Footer 스타일 */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 40px 0 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3.footer-title {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.footer-section h4.footer-subtitle {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-developer {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social-link {
    background: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    text-decoration: none;
}

.footer-social-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* 테마 토글 버튼 */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* 메인 컨텐츠 */
.main-content {
    margin-top: 80px;
    padding: 40px 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    flex: 1;
}

/* 홈페이지 스타일 */
.hero-section {
    text-align: center;
    padding: 100px 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.7;
    font-weight: 300;
    color: var(--text-secondary);
}

/* About 페이지 스타일 */
.about-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 0;
}

.about-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 40px;
    text-align: center;
}

.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
    text-align: center;
    color: var(--text-primary);
}

.about-intro {
    margin-bottom: 30px;
    font-size: 1.2rem;
    opacity: 0.8;
    color: var(--text-secondary);
}

/* 갤러리 스타일 */
.gallery-section {
    padding: 40px 0;
}

.gallery-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 50px;
    text-align: center;
}

.gallery-grid {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    align-items: flex-start;
    min-height: 200px;
}

.gallery-column {
    width: calc(25% - 15px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-item {
    position: relative;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--bg-secondary);
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.like-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border-radius: 25px;
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.like-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.like-button:hover::before {
    left: 100%;
}

.like-button:hover {
    transform: scale(1.05) translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.like-button.liked {
    color: #ff4081;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.4), rgba(255, 192, 203, 0.2));
    border-color: rgba(255, 105, 180, 0.4);
}

.like-button.liked:hover {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.5), rgba(255, 192, 203, 0.3));
    border-color: rgba(255, 105, 180, 0.5);
}

.like-count {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
    text-shadow: none;
}

/* 삭제 버튼 스타일 */
.delete-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 2;
}

.gallery-item:hover .delete-button {
    opacity: 1;
}

.delete-button:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.delete-button i {
    font-size: 1rem;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-bg);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.discord-login-button {
    background: #7289da;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.discord-login-button:hover {
    background: #5f73bc;
}

.gallery-empty {
    text-align: center;
    padding: 100px 0;
    opacity: 0.6;
}

.gallery-empty h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.gallery-empty p {
    font-size: 1rem;
    opacity: 0.8;
    color: var(--text-secondary);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .main-content {
        padding: 20px 15px;
        margin-top: 120px;
    }
    
    .hero-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .gallery-grid {
        flex-wrap: wrap;
    }
    
    .gallery-column {
        width: calc(50% - 10px);
    }
    
    .about-title,
    .gallery-title {
        font-size: 2rem;
    }

    /* Footer 모바일 스타일 */
    .footer-container {
        padding: 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 15px 20px;
    }
    
    .main-content {
        padding: 20px 10px;
    }
    
    .gallery-grid {
        gap: 15px;
    }
    
    .gallery-column {
        width: 100%;
    }
    
    /* Footer 480px 스타일 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 플로팅 메뉴 */
.floating-menu {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.floating-button {
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.floating-button:hover {
    transform: scale(1.1);
    background-color: var(--accent-hover);
}

/* 업로드 모달 */
.upload-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-bg);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}

.upload-modal.show {
    display: flex;
}

.upload-modal-content {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.upload-modal-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-primary);
}

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

.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    color: var(--text-secondary);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--accent-color);
    background-color: rgba(114, 137, 218, 0.1);
}

.upload-dropzone i {
    font-size: 40px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.upload-preview {
    display: none;
    margin-top: 20px;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.upload-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.upload-button:hover {
    background: var(--accent-hover);
}

.upload-button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.close-modal:hover {
    opacity: 1;
}

.upload-progress {
    display: none;
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-color);
    width: 0;
    transition: width 0.3s ease;
}

/* 로그인 모달 전용 스타일 (로그인 페이지와 동일) */
.login-modal-content {
    background: var(--bg-secondary) !important;
    padding: 50px !important;
    border-radius: 12px !important;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    max-width: 450px !important;
    width: 100% !important;
    box-shadow: 0 8px 32px var(--shadow-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-modal-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.login-modal-description {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 로그인 모달의 Discord 버튼 스타일 개선 */
.login-modal-content .discord-login-button {
    background: #7289da;
    color: white;
    text-decoration: none;
    padding: 18px 35px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(114, 137, 218, 0.4);
    margin: 0;
}

.login-modal-content .discord-login-button:hover {
    background: #5f73bc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 137, 218, 0.6);
}

.login-modal-content .discord-login-button i {
    font-size: 1.4rem;
}

/* 로그인 모달 반응형 */
@media (max-width: 768px) {
    .login-modal-content {
        padding: 40px 30px !important;
        margin: 0 15px;
    }
    
    .login-modal-title {
        font-size: 2rem;
    }
    
    .login-modal-content .discord-login-button {
        padding: 15px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-modal-content {
        padding: 30px 20px !important;
    }
    
    .login-modal-title {
        font-size: 1.8rem;
    }
}

/* 로그인 페이지 스타일 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 90px);
    padding: 20px;
}

.login-container {
    background: var(--bg-secondary);
    padding: 50px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    max-width: 450px;
    width: 100%;
    box-shadow: 0 8px 32px var(--shadow-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.login-description {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.login-container .discord-login-button {
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 18px 35px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(114, 137, 218, 0.4);
}

.login-container .discord-login-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 137, 218, 0.6);
}

.login-container .discord-login-button i {
    font-size: 1.4rem;
}

/* 로그인 페이지 반응형 */
@media (max-width: 768px) {
    .login-container {
        padding: 40px 30px;
        margin: 0 15px;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .login-container .discord-login-button {
        padding: 15px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 1.8rem;
    }
}

.error-message {
    background-color: #dc3545;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 1px solid #c82333;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.error-message:empty {
    display: none;
}

/* 이미지 로딩 및 오류 표시 스타일 */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 2rem;
    z-index: 10;
}

.loading-indicator i {
    animation: spin 1s linear infinite;
}

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

.image-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 20px;
    text-align: center;
    min-height: 200px;
    border-radius: 8px;
}

.image-error i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 15px;
}

.image-error p {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.retry-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.retry-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.retry-button i {
    font-size: 0.8rem;
}

/* 지연 로딩 관련 스타일 */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 20px;
    text-align: center;
    min-height: 200px;
    border-radius: 8px;
}

.image-placeholder i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    opacity: 0.6;
}

.image-placeholder span {
    font-size: 0.9rem;
    color: var(--text-muted);
} 