/* ==================== 전역 스타일 ==================== */

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

:root {
    --bg-black: #000000;
    --bg-dark: #0a0a0a;
    --text-white: #ffffff;
    --text-gray: #cccccc;
    --accent-mint: #00d9ff;
    --accent-blue: #0066ff;
    --accent-light: #66e0ff;
    --border-color: #333333;
    --card-bg: rgba(20, 20, 20, 0.9);
    --hover-bg: rgba(0, 217, 255, 0.1);
}

body {
    font-family: 'Noto Sans KR', 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-black);
    background-image: url('/static/images/fantasy-world.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

/* ==================== 초기 로딩 애니메이션 ==================== */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.light-beam {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-mint) 50%, 
        transparent 100%);
    box-shadow: 0 0 20px var(--accent-mint),
                0 0 40px var(--accent-mint),
                0 0 80px var(--accent-mint);
    animation: beamExpand 1.5s ease-out forwards;
}

@keyframes beamExpand {
    0% {
        height: 2px;
        opacity: 1;
    }
    100% {
        height: 100vh;
        opacity: 0;
    }
}

.portal-opening {
    position: absolute;
    width: 100%;
    height: 2px;
    background-image: url('/static/images/fantasy-world.jpg');
    background-size: cover;
    background-position: center;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    opacity: 0;
    animation: portalOpen 1s ease-out forwards;
}

@keyframes portalOpen {
    0% {
        height: 2px;
        opacity: 0;
    }
    50% {
        height: 100vh;
        opacity: 0.5;
    }
    100% {
        height: 100vh;
        opacity: 1;
    }
}

.loading-screen.complete {
    animation: fadeOut 0.5s ease-out 1s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* ==================== 스크롤 애니메이션 ==================== */

.fade-in-section {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-out-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-out-section.hidden {
    opacity: 0;
    transform: translateY(-30px);
}

/* ==================== 헤더 ==================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent-mint), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-white);
    text-decoration: none;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-mint);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-mint);
}

.nav-link:hover::after {
    width: 100%;
}

/* ==================== 공지사항 티커 ==================== */

.notice-ticker {
    position: relative;
    width: 100%;
    background: linear-gradient(90deg, rgba(0, 102, 255, 0.2), rgba(0, 217, 255, 0.2));
    padding: 15px 20px;
    border-bottom: 1px solid var(--accent-blue);
    margin-top: 80px;
}

.notice-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.notice-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-white);
    text-align: center;
}

.notice-badge {
    background: var(--accent-mint);
    color: var(--bg-black);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    margin-right: 12px;
    font-size: 12px;
    flex-shrink: 0;
}

/* ==================== 컨테이너 ==================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.main-content {
    min-height: 100vh;
    background: radial-gradient(ellipse at center, rgba(0, 102, 255, 0.1) 0%, transparent 70%);
}

/* ==================== 섹션 ==================== */

.section {
    margin-bottom: 100px;
}

.section-title {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent-mint), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 60px;
}

/* ==================== 카드 ==================== */

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    border-color: var(--accent-mint);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
    transform: translateY(-5px);
}

.card-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--accent-mint);
}

.card-content {
    color: var(--text-gray);
    line-height: 1.8;
}

/* ==================== 버튼 ==================== */

.btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    border-radius: 30px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-mint), var(--accent-blue));
    border-color: transparent;
    color: var(--text-white);
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    border-color: var(--accent-mint);
    color: var(--accent-mint);
}

.btn-secondary:hover {
    background: var(--accent-mint);
    color: var(--bg-black);
}

.btn-disabled {
    background: #333333;
    border-color: #555555;
    color: #888888;
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-disabled:hover {
    box-shadow: none;
    transform: none;
}

.btn-disabled::before {
    display: none;
}

/* ==================== 버튼 활성화 애니메이션 ==================== */

.btn-active {
    animation: btnGlow 2s ease-in-out infinite;
}

@keyframes btnGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 217, 255, 0.8);
    }
}

/* ==================== 폼 스타일 ==================== */

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-white);
    font-size: 16px;
}

.form-label.required::after {
    content: ' *';
    color: #ff4444;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 15px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-mint);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.form-file {
    display: none;
}

.file-upload-btn {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(0, 217, 255, 0.1);
    border: 2px dashed var(--accent-mint);
    border-radius: 10px;
    color: var(--accent-mint);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    border-style: solid;
}

.file-name {
    margin-top: 10px;
    color: var(--text-gray);
    font-size: 14px;
}

/* ==================== 테이블 ==================== */

.table-container {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-mint);
    font-weight: bold;
}

.table tr:hover {
    background: var(--hover-bg);
}

/* ==================== 배지 ==================== */

.badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.badge-pending {
    background: rgba(255, 165, 0, 0.2);
    color: #ffaa00;
    border: 1px solid #ffaa00;
}

.badge-approved {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border: 1px solid #00ff00;
}

.badge-rejected {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
    border: 1px solid #ff4444;
}

/* ==================== 모달 ==================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--accent-mint);
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: var(--text-gray);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-mint);
}

.modal-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--accent-mint);
}

/* ==================== 알림 메시지 ==================== */

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: alertSlideIn 0.3s ease-out;
}

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

.alert-success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    color: #00ff00;
}

.alert-error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
}

.alert-info {
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--accent-mint);
    color: var(--accent-mint);
}

/* ==================== 로딩 스피너 ==================== */

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 217, 255, 0.3);
    border-top-color: var(--accent-mint);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    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: 3000;
}

/* ==================== 그리드 레이아웃 ==================== */

.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ==================== 반응형 ==================== */

@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .nav-links {
        gap: 15px;
        font-size: 14px;
    }
    
    .container {
        padding: 120px 15px 40px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 30px 20px;
    }
}

/* ==================== 스크롤바 커스텀 ==================== */

::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-mint), var(--accent-blue));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-mint);
}

/* ==================== 유틸리티 클래스 ==================== */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-20 {
    gap: 20px;
}

/* ==================== 토스트 알림 ==================== */

#toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: var(--card-bg);
    border: 1px solid var(--accent-mint);
    border-left: 4px solid var(--accent-mint);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3),
                0 0 40px rgba(0, 217, 255, 0.2);
    opacity: 0;
    transform: translateX(-400px);
    animation: toastSlideIn 0.4s ease-out forwards;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

.toast.toast-success {
    border-left-color: #00ff88;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

.toast.toast-error {
    border-left-color: #ff4444;
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.3);
}

.toast.toast-warning {
    border-left-color: #ffaa00;
    box-shadow: 0 4px 20px rgba(255, 170, 0, 0.3);
}

.toast.toast-info {
    border-left-color: var(--accent-mint);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
}

.toast.toast-hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-white);
    margin-bottom: 4px;
}

.toast-text {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-white);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-400px);
    }
}

/* ==================== 로딩 스피너 ==================== */

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    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: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-mint);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    color: var(--text-white);
    font-size: 18px;
    margin-top: 20px;
    text-align: center;
}

