﻿@keyframes scanFramePulse {
    0% {
        box-shadow: 0 0 0 2px #f6c900, 0 0 14px 0 #fff5cc;
    }

    100% {
        box-shadow: 0 0 0 3.2px #e1af00, 0 0 24px 7px #fff3a9;
    }
}

@media (max-width: 600px) {
    .fixed-width-box {
        max-width: 99vw !important;
        border-radius: 1.07rem;
    }

    .main-title {
        font-size: 1.08rem;
    }

    .main-logo {
        width: 36px;
        height: 36px;
    }

    #visualScanFrame {
        border-radius: 10px;
    }
}

body {
    background: url('/images/img_background.png') repeat, /* 아이콘 이미지 (패턴처럼 반복) */
    linear-gradient(120deg, #fffbe4 0%, #fff 100%); /* 기존 그라디언트 */
    background-size: 300px auto, cover; /* 첫 번째는 패턴 크기, 두 번째는 cover */
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Segoe UI', Arial, sans-serif;
    color: #222;
    letter-spacing: -0.01em;
}

.fixed-width-box {
    max-width: 340px;
    width: 100%;
    margin: 0 auto;
    background: 
        url('/images/bg-pattern.png') repeat, /* 아이콘 이미지 */
        linear-gradient(120deg, #fffbe4 0%, #fff 100%); /* 기존 배경 느낌 */
    background-size: 300px auto, cover;
    background-position: center;

    border-radius: 1.08rem;
    box-shadow: 0 2px 20px 0 #ffe79940;
    padding: 2.15rem 1.05rem 1.4rem 1.05rem;
    border: 1.2px solid #fae98e;
    transition: box-shadow 0.18s;
}

.title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1.13rem;
    width: 100%; /* 부모 칼럼 가로폭 다 사용 */
    max-width: none; /* Bootstrap 제한 해제 */
    padding: 0; /* 좌우 여백 제거 */
}

.main-logo {
    width: 250px; /* 항상 250px */
    height: auto; /* 세로 비율 유지 */
    display: block;
    border-radius: 40%;
    background: #fffbe4;
    border: 1.5px solid #fff3a9;
    box-shadow: 0 1px 7px #ffe97022;
    object-fit: contain;
}

.main-title {
    font-size: 1.13rem;
    font-weight: 800;
    color: #2d2006;
    margin: 0;
    line-height: 1.16;
    letter-spacing: -0.01em;
    word-break: keep-all;
    text-shadow: 0 0.5px 0 #fffae1;
}

.aztec-video-container {
    background: #fffde6;
    border-radius: 0.95rem;
    margin: 0 auto 1.12rem auto;
    position: relative;
    box-shadow: 0 0.7px 9px #fae48427;
    width: 100%;
    min-height: 164px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1.3px solid #ffe070;
}

#video {
    width: 100%;
    max-width: 97%;
    border-radius: 0.95rem;
    background: #fffbe4;
    aspect-ratio: 1/1;
    object-fit: cover;
    box-shadow: none;
}

#visualScanFrame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 74%;
    height: 59%;
    border-radius: 12px;
    border: 2.2px solid #f6c900;
    background: rgba(253, 244, 175, 0.10);
    animation: scanFramePulse 1.15s infinite alternate;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 0 10px #fff4b933;
    transition: border 0.18s;
}

#scanOverlay {
    margin: 1.08rem auto 0 auto;
    text-align: center;
}

.scan-overlay-text {
    background: #f6c900;
    color: #4b3901;
    font-size: 1.01rem;
    padding: 0.38em 1.25em;
    border-radius: 1.25em;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 6px #fff7c633;
    border: none;
    display: inline-block;
    /* 글씨 색상 애니메이션 */
    animation: text-fade-color 4s infinite;
}

@keyframes text-fade-color {
    0% {
        color: #4b3901;
    }
    /* 원래 갈색 */
    50% {
        color: #dc0000;
    }
    /* 진한 빨강 */
    100% {
        color: #4b3901;
    }
    /* 다시 원래 색 */
}


#result {
    margin: 1.45rem auto 0 auto;
    padding: 0.82em 1em;
    background: #fffde9;
    border-radius: 0.93rem;
    color: #392900;
    font-size: 1.03rem;
    border: 1px solid #fff3bc;
    box-shadow: 0 1px 7px #fff5d110;
    text-align: center;
}

    #result .text-muted {
        color: #001f4d !important; /* 남색 */
        font-size: 1.1em;
        font-weight: bold;
        text-shadow: 0 0 4px #3399ff, 0 0 8px #66ccff;
        animation: neon-blink 2.5s infinite alternate;
    }

@keyframes neon-blink {
    0% {
        opacity: 1;
        text-shadow: 0 0 4px #3399ff, 0 0 8px #66ccff;
    }

    50% {
        opacity: 0.7;
        text-shadow: none; /* 꺼진 순간 */
    }

    100% {
        opacity: 1;
        text-shadow: 0 0 5px #3399ff, 0 0 10px #66ccff;
    }
}



#full-overlay {
    background: rgba(255,245,200,0.78) !important;
    backdrop-filter: blur(2px);
}

    #full-overlay > div {
        background: linear-gradient(100deg, #fff 80%, #fffbe4 100%);
        border-radius: 1.09rem;
        box-shadow: 0 2px 22px #ffe86f34;
        padding: 1.12em 0.91em 1.5em 0.91em;
    }

.scan-result-icon {
    font-size: 1.19rem !important;
    color: #f6c900;
    margin-bottom: 0.22rem;
}

.scan-result-brand,
.scan-result-token,
.scan-result-count {
    font-size: 0.96rem;
    font-weight: 700;
}
#startBtn {
    display: block;
    width: 100%;
    border-radius: 1.7em;
    font-size: 1.13rem;
    font-weight: 700;
    padding: 0.72em 0;
    background: #fee500;
    color: #191600;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15); /* 진짜 버튼 같은 그림자 */
    margin-bottom: 1.4rem; /* 넉넉하게 */
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
    outline: none;
    cursor: pointer;
}

    #startBtn:hover {
        background: #ffd700; /* hover 시 색 살짝 진하게 */
        color: #1c1300;
        box-shadow: 0 6px 12px rgba(0,0,0,0.2); /* 그림자 강하게 */
        transform: translateY(-2px); /* 떠오르는 느낌 */
    }

    #startBtn:active {
        background: #f6c900; /* 눌렀을 때 더 어둡게 */
        color: #1c1300;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* 그림자 줄임 */
        transform: translateY(1px); /* 눌린 느낌 */
    }
    .aztec-video-container {
        margin-top: 1.2rem; /* 카드 자체도 약간 띄움 */
    }

.fixed-width-box {
    /* 화면을 더 넓게 쓰되, 최대 폭만 상한으로 제한 */
    max-width: clamp(560px, 92vw, 840px);
    padding: .75rem .75rem .5rem !important; /* 내부 여백 더 축소 */
    margin: 0 auto;
}

/* 타이틀 행 간격 */
.title-row {
    gap: .5rem;
}

/* 비디오/오버레이: 부모 폭을 그대로 사용(= 더 넓게) */
.aztec-video-container,
#scanOverlay {
    max-width: 100% !important; /* 기존 520px 제한 해제 */
    margin-left: auto !important;
    margin-right: auto !important;
    border: 0 !important;
}

.aztec-video-display {
    width: 100% !important;
    height: auto !important;
    border-radius: 10px;
}

/* 캔버스는 숨김 유지 */
#canvas {
    display: none !important;
}

/* 결과 텍스트 위 여백 */
#result {
    margin-top: .5rem;
}

/* 페이지 좌우 여백(컨테이너 패딩) 줄이기 */
#mainContent {
    padding-left: .25rem;
    padding-right: .25rem;
}

    /* Bootstrap 가터(컬럼 사이 여백) 줄이기 */
    #mainContent .row {
        --bs-gutter-x: .5rem;
    }
/* 기본은 1.5rem */

