@import url('https://fonts.googleapis.com/css2?family=Anton&family=Noto+Sans+KR:wght@400;700;900&display=swap');

:root {
    --bg-color: #050505;
    --main-green: #39FF14; /* 채도 높은 네온 초록 */
    --text-color: #ffffff;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Noto Sans KR', sans-serif;
    overflow-x: hidden;
    cursor: crosshair; /* 감각적인 커서 효과 */
}

h1, h2, h3, .logo, .marquee, .marquee-partners, .btn {
    font-family: 'Anton', sans-serif;
    letter-spacing: 2px;
}

/* Three.js Canvas */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Header & Logo */
header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 50px;
    z-index: 1000;
    mix-blend-mode: difference;
}

.logo {
    font-size: 2.5rem;
    color: var(--main-green);
    text-shadow: 3px 3px 0px #fff, -1px -1px 0 #000; /* 스티커처럼 보이도록 굵은 텍스트 섀도우 적용 */
    transform: rotate(-5deg); /* 키치한 느낌의 기울기 */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.logo:hover {
    transform: scale(1.1) rotate(2deg);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--main-green);
    border-radius: 5px;
    transition: all 0.3s;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 700;
    font-size: 1.2rem;
    transition: color 0.3s, text-shadow 0.3s;
}

nav a:hover {
    color: var(--main-green);
    text-shadow: 0 0 10px var(--main-green);
}

@media (max-width: 768px) {
    header {
        padding: 20px 30px;
    }

    .logo {
        font-size: 1.8rem;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1050;
        mix-blend-mode: normal;
    }

    nav.active {
        right: 0;
    }

    nav a {
        margin: 20px 0 !important;
        margin-left: 0 !important;
        font-size: 2rem !important;
    }

    .menu-toggle.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
}

/* Philosophy Section */
#philosophy {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 150px 50px;
    background-image: linear-gradient(rgba(5, 5, 5, 0.8), rgba(5, 5, 5, 0.8)), url('https://i.namu.wiki/i/LNbjHcR34WxvUiHtcfiDmRQeVm3KFt6mk_QJYf_001zKodXHDEEzMLVorzCigtFt7QNMdwsC_zqDEQsesI9JYIRw7-DXShBPZBKLhRO2FZDe87VzJZ5-8dyLtt5GapTPYBM-CzGP6P1SofCbEzBbfw.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

.philosophy-text {
    font-size: 2.2rem;
    line-height: 1.8;
    word-break: keep-all;
    font-weight: 400;
    color: #eee;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    #philosophy { padding: 100px 20px; }
    .philosophy-text { font-size: 1.2rem; line-height: 1.6; }
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

#hero h1 {
    font-size: 8rem;
    line-height: 1;
    margin: 0;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    #hero h1 { font-size: 3.5rem; }
    #hero p { font-size: 1.1rem !important; letter-spacing: 2px !important; }
}

.green {
    color: var(--main-green);
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

#hero p {
    margin-top: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: #ccc;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 rgb(251, 255, 0);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 44px, 0); }
    20% { clip: rect(80px, 9999px, 22px, 0); }
    40% { clip: rect(30px, 9999px, 88px, 0); }
    60% { clip: rect(50px, 9999px, 10px, 0); }
    80% { clip: rect(90px, 9999px, 77px, 0); }
    100% { clip: rect(20px, 9999px, 55px, 0); }
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    font-size: 1.2rem;
    color: var(--main-green);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* Panels */
.panel {
    min-height: 100vh;
    padding: 100px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel h2 {
    font-size: 5rem;
    margin-bottom: 50px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .panel { padding: 80px 20px; }
    .panel h2 { font-size: 2.5rem; margin-bottom: 30px; }
    .about-content p { font-size: 1.2rem !important; }
    .marquee-inner { font-size: 1.5rem !important; }
}

/* Marketing Page Specific */
.marketing-num {
    font-family: 'Anton', sans-serif;
    font-size: 8rem;
    line-height: 1;
    opacity: 0.2;
    margin-bottom: -40px;
    z-index: -1;
}

.marketing-page .about-content p {
    font-size: 1.5rem;
    max-width: 1000px;
}

.marketing-page .panel {
    padding-top: 200px;
    padding-bottom: 200px;
}

/* About Section */
.about-content p {
    font-size: 2rem;
    line-height: 1.6;
    max-width: 800px;
    word-break: keep-all;
}

/* Marquee / Ticker Tape */
.marquee {
    margin-top: 100px;
    width: 100vw;
    margin-left: -50px;
    background: var(--main-green);
    color: var(--bg-color);
    padding: 20px 0;
    overflow: hidden;
    white-space: nowrap;
    transform: rotate(3deg) scale(1.1); /* 키치하고 삐딱한 느낌 */
}

/* Partners Marquee (Horizontal & White) */
.marquee-partners {
    margin-top: 100px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: rgba(255, 255, 255, 0.95); /* 거의 불투명한 흰색 띠 */
    padding: 60px 0;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.partner-marquee-inner {
    display: flex;
    width: max-content;
    animation: marquee-scroll 30s linear infinite; /* 속도를 조금 늦춤 */
}

/* 파트너 로고 이미지 스타일 */
.partner-logos {
    display: flex;
    align-items: center;
    padding-right: 0; /* 개별 그룹 패딩 제거 */
}

.partner-logos img {
    height: 100px; /* 로고 크기 충분히 확대 */
    margin: 0 80px; /* 로고 사이 간격 확대 */
    object-fit: contain;
    filter: grayscale(100%) contrast(1.2);
    opacity: 0.7;
    transition: all 0.4s ease;
}

.partner-logos img:hover {
    filter: none;
    opacity: 1;
    transform: scale(1.1);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.admin-container {
    max-width: 900px;
    margin: 150px auto;
    padding: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--main-green);
    border-radius: 20px;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px;
}

.admin-form input {
    padding: 15px;
    background: transparent;
    border: 1px solid #444;
    color: white;
    font-size: 1.1rem;
    border-radius: 10px;
}

.admin-form input:focus {
    border-color: var(--main-green);
    outline: none;
}

.admin-list {
    display: grid;
    gap: 20px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.admin-item .actions {
    display: flex;
    gap: 10px;
}

.btn-delete {
    background: #ff3e3e;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-save {
    background: var(--main-green);
    color: black;
    padding: 15px;
    border: none;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-save:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px var(--main-green);
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-upload {
    background: #444;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-upload:hover {
    background: #555;
}

.editor-label {
    font-family: 'Anton', sans-serif;
    color: var(--main-green);
    margin-bottom: 10px;
}

/* Detail Page Styles */
.detail-container {
    max-width: 1000px;
    margin: 150px auto;
    padding: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.detail-header {
    margin-bottom: 50px;
    border-bottom: 2px solid var(--main-green);
    padding-bottom: 20px;
}

.detail-header h1 {
    font-size: 4rem;
    margin-bottom: 10px;
}

.detail-header span {
    font-size: 1.5rem;
    color: #888;
}

.detail-content {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #eee;
}

.detail-content img {
    max-width: 100%;
    border-radius: 20px;
    margin: 30px 0;
}

/* Quill Video Responsive Wrapper */
.detail-content iframe.ql-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    border: 2px solid var(--main-green);
    margin: 30px 0;
}

.detail-thumbnail {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 50px;
    border: 3px solid var(--main-green);
}

.ql-toolbar.ql-snow {
    background: #f0f0f0;
    border-radius: 10px 10px 0 0;
    border: none;
}

.ql-container.ql-snow {
    border: none;
    font-size: 1.1rem;
}

/* 에디터 내부 비디오 크기 조정 */
.ql-editor iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.marquee-inner {
    display: flex;
    align-items: center;
    width: max-content;
    font-size: 3rem;
    animation: marquee-scroll 10s linear infinite;
}

.marquee-inner span {
    padding-right: 50px;
}

/* 파트너 로고 이미지 스타일 */
.partner-logos {
    display: flex;
    align-items: center;
    padding-right: 50px; /* 로고 그룹 간의 간격 */
}

.partner-logos img {
    height: 100px; /* 로고 이미지 높이 고정 (원하는 크기로 조절 가능) */
    margin-right: 50px; /* 각 로고 이미지 간의 간격 */
    object-fit: contain;
    filter: grayscale(100%); /* 흑백으로 처리 (원치 않으면 제거) */
    transition: filter 0.3s;
}

.partner-logos img:hover {
    filter: none; /* 마우스 오버 시 원래 색상 표시 */
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Works Section */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3열 고정으로 변경하여 안정성 확보 */
    gap: 30px;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
}

.work-item {
    position: relative;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 1 !important; /* 애니메이션 전에도 보이도록 우선 설정 */
}

@media (max-width: 1024px) {
    .works-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .works-grid { grid-template-columns: 1fr; }
}

.work-item:hover {
    transform: translateY(-20px) scale(1.02);
}

.work-img {
    width: 100%;
    height: 400px;
    background: #111;
    border: 3px solid var(--main-green);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #444;
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
}

.work-item:hover .work-img {
    background: var(--main-green);
    color: var(--bg-color);
    box-shadow: 15px 15px 0px #fff; /* 스티커/팝아트 느낌의 그림자 */
}

.work-item h3 {
    margin-top: 20px;
    font-size: 2rem;
    text-shadow: 2px 2px 0px var(--main-green);
    color: rgb(255, 255, 255); /* 텍스트는 흰색 유지 */
    -webkit-text-stroke: 0.2px #000; /* 검은색 텍스트 테두리(stroke) 추가 */
}

/* Contact Section */
#contact {
    align-items: center;
    text-align: center;
    padding-bottom: 150px;
}

#contact p {
    font-size: 1.5rem;
    margin-bottom: 50px;
}

.inquiry-form {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10; /* Three.js 캔버스 위에 보이도록 설정 */
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.inquiry-form input, 
.inquiry-form textarea {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: white;
    border-radius: 15px;
    font-size: 1.1rem;
    font-family: 'Noto Sans KR', sans-serif;
}

.inquiry-form input:focus, 
.inquiry-form textarea:focus {
    outline: none;
    border-color: var(--main-green);
    background: rgba(255, 255, 255, 0.1);
}

.inquiry-form textarea {
    height: 200px;
    resize: none;
}

.btn {
    display: inline-block;
    padding: 20px 60px;
    font-size: 2.2rem;
    color: #050505; /* 어두운 색으로 고정하여 가독성 확보 */
    background: var(--main-green);
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    border: none;
    box-shadow: 5px 5px 0px #fff;
    cursor: pointer;
    font-family: 'Anton', sans-serif;
    align-self: center;
    position: relative;
    z-index: 100; /* 버튼이 캔버스 뒤로 숨지 않도록 보장 */
}

.btn:hover {
    background: var(--bg-color);
    color: var(--main-green);
    border-color: var(--main-green);
    box-shadow: 5px 5px 0px var(--main-green), inset 0 0 10px var(--main-green);
    transform: translate(-2px, -2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Header & Navigation */
    header {
        padding: 20px !important;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        mix-blend-mode: normal; /* 모바일에서는 가독성을 위해 블렌드 모드 해제 */
    }

    .logo {
        font-size: 1.8rem;
    }

    .menu-toggle {
        display: flex !important; /* 햄버거 아이콘 강제 표시 */
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1050;
    }

    nav.active {
        right: 0;
    }

    nav a {
        margin: 20px 0 !important;
        font-size: 2rem !important;
        text-shadow: none;
    }

    /* Hamburger Animation */
    .menu-toggle.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

    /* Typography */
    #hero h1 { font-size: 3.5rem; }
    #hero p { font-size: 1.1rem; letter-spacing: 2px; }
    .panel h2 { font-size: 2.5rem; margin-bottom: 30px; }
    .about-content p { font-size: 1.2rem; }
    .marquee-inner { font-size: 1.5rem; }
    
    /* Layouts */
    .panel { padding: 80px 20px; }
    .works-grid { grid-template-columns: 1fr; gap: 20px; }
    .work-img { height: 300px; }
    
    /* Contact Form Fix */
    #contact { padding: 60px 20px; }
    .inquiry-form { padding: 0 10px; width: 100%; box-sizing: border-box; }
    .form-row { grid-template-columns: 1fr; gap: 15px; } /* 입력창 세로 배치 */
    .inquiry-form input, .inquiry-form textarea { padding: 15px; font-size: 1rem; width: 100%; box-sizing: border-box; }
    .btn { font-size: 1.5rem; padding: 15px 40px; width: 100%; text-align: center; }
}