/* ===== 프리 최신글 스코프: .frl-scope 하위로만 적용 ===== */
.frl-scope{
    --co-bg-primary: #ffffff;
    --co-bg-secondary: #f8fafc;
    --co-border: #e2e8f0;
    --co-text: #1e293b;
    --co-text-muted: #64748b;
    --co-accent: #3b82f6;
    --co-accent-hover: #2563eb;
    --co-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --co-shadow-hover: 0 4px 12px rgba(0,0,0,0.15);    
}

/* ===== 기본 레이아웃 ===== */
.frl-scope .frl-wrap{
    width:100%; 
    max-width: 980px; 
    margin: 0 auto;
    box-sizing:border-box;
    padding: 20px;
}

.frl-scope .frl-inner{
    display:flex;
    flex-direction:column;
    padding: 24px;
    border-radius: 12px;
    background: var(--co-bg-primary);
    border: 1px solid #7ea6e6c4;
    box-shadow: var(--co-shadow);
}


.title_main {
    position: relative;
    height: 50px;
    width: 150px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    border-image: linear-gradient(90deg, #00ffff, #ff00ff) 1;
    margin-bottom: 20px;
}

.title_main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 255, 255, 0.1), 
        rgba(255, 0, 255, 0.1), 
        transparent);
    animation: scan 3s infinite ease-in-out;
}

@keyframes scan {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.rotating-text {
    position: relative;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.text-container {
    position: relative;
    height: 50px;
    width: 180px;
    perspective: 1000px;
}

.text-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.text-item.english {
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    transform: rotateX(0deg);
    animation: flipOut 3s infinite ease-in-out;
}

.text-item.korean {
    color: #ff00ff;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
    transform: rotateX(180deg);
    animation: flipIn 3s infinite ease-in-out;
}

/* 영어 → 사라짐 */
@keyframes flipOut {
    0%, 35% {
        transform: rotateX(0deg);
        opacity: 1;
    }
    45% {
        transform: rotateX(90deg);
        opacity: 0;
    }
    55%, 100% {
        transform: rotateX(180deg);
        opacity: 0;
    }
}

/* 한글 → 등장 */
@keyframes flipIn {
    0%, 35% {
        transform: rotateX(180deg);
        opacity: 0;
    }
    45% {
        transform: rotateX(90deg);
        opacity: 0;
    }
    55%, 100% {
        transform: rotateX(0deg);
        opacity: 1;
    }
}
@media (max-width: 768px) {
    .frl-scope .frl-wrap{
        margin-bottom: 85px;
    }
}

/* ===== 작성폼 ===== */
.frl-scope .frl-form{
    display:flex;
    flex-direction:column;
    gap:16px;
    margin-bottom: 24px;
}

.frl-scope .frl-row{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.frl-scope .frl-col{
    flex:1 1 calc(50% - 6px);
}

.frl-scope .frl-row.frl-full .frl-col{
    flex:1 1 100%;
}

.frl-scope .frl-inner input,
.frl-scope .frl-inner select,
.frl-scope .frl-inner textarea{
    width:100%;
    padding: 12px 16px;
    border: 2px solid #c9dbf8;
    border-radius: 8px;
    font-size: 14px;
    background: var(--co-bg-primary);
    color: var(--co-text);
    box-sizing:border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.frl-scope .frl-inner input:focus,
.frl-scope .frl-inner select:focus,
.frl-scope .frl-inner textarea:focus{
    outline: none;
    border-color: var(--co-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.frl-scope .frl-inner textarea{
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.frl-scope .frl-submit{
    width:100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: var(--co-accent);
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.frl-scope .frl-submit:hover{ background: var(--co-accent-hover); }
.frl-scope .frl-submit:active{ transform: translateY(1px); }

/* ===== 비밀글 토글 ===== */
.frl-scope .frl-secret{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #dce5f3;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    margin-bottom: 12px;
}

.frl-scope .frl-secret-left{
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--co-text-muted);
    font-size: 14px;
}

.frl-scope .frl-lock{
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #3b82f6;
    color: #fff;
    font-size: 14px;
}

.frl-scope .frl-toggle{
    position: relative;
    width: 44px;
    height: 24px;
}
.frl-scope .frl-toggle input{ display:none; }
.frl-scope .frl-toggle .track{
    position: absolute;
    inset: 0;
    background: #cadaee;
    border-radius: 999px;
    transition: .3s ease;
}
.frl-scope .frl-toggle .thumb{
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: .3s ease;
}
.frl-scope .frl-toggle input:checked + .track{ background: var(--co-accent); }
.frl-scope .frl-toggle input:checked + .track .thumb{ left: calc(100% - 22px); }

/* ===== 캡챠 ===== */
.frl-scope .frl-captcha{
    border: 1px solid var(--co-border);
    border-radius: 8px;
    padding: 16px;
    background: var(--co-bg-secondary);
}
.frl-scope .frl-captcha-grid{
    display: grid;
    grid-template-columns: auto auto auto;
    grid-template-areas: "img mp3 reload" "input input input" "note note note";
    gap: 12px;
    align-items: center;
}
.frl-scope .frl-captcha-note{
    grid-area: note;
    font-size: 13px;
    color: var(--co-text-muted);
}

/* ===== 구분선 ===== */
.frl-scope .frl-sep{
    margin: 24px 0;
    height: 1px;
    background: var(--co-border);
    border: 0;
}

/* ===== 리스트 ===== */
.frl-scope .frl-list{
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.frl-scope .frl-item{
    background: #dfe5ec;
    border: 1px solid var(--co-border);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.frl-scope .frl-item:hover{
    transform: translateY(-2px);
    box-shadow: var(--co-shadow-hover);
    border-color: var(--co-accent);
}
.frl-scope .frl-excerpt{
    font-size: 15px;
    color: var(--co-text);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.frl-scope .frl-meta{
    font-size: 13px;
    color: var(--co-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}
.frl-scope .frl-sep-dot{ color: var(--co-border); }

/* ===== 모달 ===== */
.frl-scope .frl-modal-overlay{
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    backdrop-filter: blur(4px);
}
.frl-scope .frl-modal{
    width: min(760px, 94vw);
    max-height: 80vh;
    overflow: auto;
    background: var(--co-bg-primary);
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}
.frl-scope .frl-modal-hd{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--co-border);
    position: sticky;
    top: 0;
    background: var(--co-bg-primary);
}
.frl-scope .frl-modal-title{
    font-weight: 600;
    font-size: 18px;
    color: var(--co-text);
}
.frl-scope .frl-modal-close{
    border: 0;
    background: var(--co-bg-secondary);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--co-text-muted);
}
.frl-scope .frl-modal-bd{
    padding: 20px;
    color: var(--co-text);
    line-height: 1.6;
}

/* ===== 댓글 ===== */
.frl-scope .frl-modal-cmt{
    border-top: 1px solid var(--co-border);
    padding: 16px 20px;
    background: var(--co-bg-secondary);
}
.frl-scope .frl-cmt-head{
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}
.frl-scope .frl-cmt-form{
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.frl-scope .frl-cmt-form input{
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--co-border);
    border-radius: 6px;
}
.frl-scope .frl-cmt-btn{
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: var(--co-accent);
    color: #fff;
    cursor: pointer;
}

/* ===== 토스트 ===== */
.frl-scope .frl-toast{
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: var(--co-text);
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    z-index: 2500;
    transition: all 0.3s ease;
}
.frl-scope .frl-toast.show{
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ===== 페이징 (축소 버전) ===== */
.frl-scope .pg_neo{
    display: flex;
    justify-content: center;
    margin: 16px 0;
}
.frl-scope .pg_neo .neo-wrap{
    display: inline-flex;
    gap: 4px;
    align-items: center;
    background: var(--co-bg-primary);
    border: 1px solid var(--co-border);
    border-radius: 8px;
    padding: 4px 6px;
    box-shadow: var(--co-shadow);
}
.frl-scope .neo-btn{
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--co-bg-secondary);
    border: 1px solid var(--co-border);
    color: var(--co-text);
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.frl-scope .neo-btn:hover{
    background: var(--co-accent);
    color: #ffffff;
    border-color: var(--co-accent);
}
.frl-scope .neo-btn.neo-current{
    background: var(--co-accent);
    color: #ffffff;
    border-color: var(--co-accent);
}
.frl-scope .neo-btn.neo-disabled{
    opacity: 0.4;
    pointer-events: none;
}
.frl-scope .neo-chip{
    margin-left: 4px;
    padding: 0 8px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    background: var(--co-bg-secondary);
    border: 1px solid var(--co-border);
    border-radius: 999px;
    color: var(--co-text-muted);
    font-size: 11px;
}

/* ===== 모바일 최적화 ===== */
@media (max-width: 768px){
    .frl-scope .frl-inner{ padding: 16px; }
    .frl-scope .frl-col{ flex: 1 1 100%; }
    .frl-scope .pg_neo .neo-wrap{ gap: 2px; padding: 3px 4px; }
    .frl-scope .neo-btn{ min-width: 22px; height: 22px; font-size: 12px; }
    .frl-scope .neo-chip{ display: none; }
}
