/* 공용 스타일 */
/* body 스타일은 각 페이지에서 개별 정의 */

/* 공통 네비게이션 */
.top-navigation {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
    padding: 1rem 1.5rem !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.nav-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 0.75rem !important;
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    transition: all 0.2s ease-in-out !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    margin-left: 0.5rem !important;
}

.nav-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* 네비게이션이 있을 때 메인 컨테이너 여백 조정 */
body:has(.top-navigation) .main-container,
body:has(.top-navigation) #app,
body:has(.top-navigation) .container {
    margin-top: 5rem;
}

/* Tailwind CSS 유틸리티 클래스들 */
.flex {
    display: flex !important;
}

.items-center {
    align-items: center !important;
}

.gap-3 {
    gap: 0.75rem !important;
}

.group {
    position: relative !important;
}

/* 네비게이션 내부 레이아웃 */
.top-navigation .flex {
    display: flex !important;
}

.top-navigation .items-center {
    align-items: center !important;
}

.top-navigation .gap-3 {
    gap: 0.75rem !important;
}

/* 네비게이션 내부 요소들 강제 적용 */
.top-navigation>div {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

/* 애니메이션 */
@keyframes shake {

    10%,
    90% {
        transform: translateX(-1px);
    }

    20%,
    80% {
        transform: translateX(2px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-4px);
    }

    40%,
    60% {
        transform: translateX(4px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.7s ease-in-out forwards;
    opacity: 0;
}

@keyframes item-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 도넛 차트 */
.score-donut {
    --percentage: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--chart-color) calc(var(--percentage) * 1%),
            #e2e8f0 0);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: --percentage 1s ease-in-out, background-color 0.3s;
}

.score-donut::before {
    content: '';
    position: absolute;
    width: 85%;
    height: 85%;
    background: var(--bg-color, #ffffff);
    border-radius: 50%;
    transition: background-color 0.3s;
}

/* 카드 스타일 */
.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.card.open .card-details {
    max-height: 1200px;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.card.open .chevron-icon {
    transform: rotate(180deg);
}

.card-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 1.5rem;
    transition: background-color 0.3s ease;
}

.card-header:hover {
    background-color: #f8fafc;
}

.status-bar {
    width: 6px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
    transition: background-color 0.3s ease, border-radius 0.3s ease;
}

.card.open .status-bar {
    border-bottom-left-radius: 0;
}

.card.open .card-details {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* 코드 블록 스타일 */
.prose pre {
    background-color: #1a202c;
    color: #e2e8f0;
    padding: 1.5em;
    border-radius: 0.75em;
    overflow-x: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.prose code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    color: #d1d5db;
    font-size: 0.9em;
}

/* 공통 네비게이션 스타일 */
.top-navigation {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 50;
    padding: 1rem;
}

@media (min-width: 768px) {
    .top-navigation {
        padding: 1.5rem;
    }
}

.nav-button {
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.3s ease;
}

.nav-button:hover {
    background-color: white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.nav-button svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #475569;
    transition: color 0.3s ease;
}

.nav-button:hover svg {
    color: #1e293b;
}

/* Writer 탭 배지 스타일 */
.writer-tab .absolute {
    pointer-events: none;
    white-space: nowrap;
    min-width: max-content;
}

/* Writer 탭 활성화 시 스타일 */
.writer-tab.active {
    opacity: 1 !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border-color: #10b981 !important;
}

.writer-tab.active .text-slate-400 {
    color: white !important;
}

/* Writer 탭 배지 겹침 방지 */
.writer-tab {
    overflow: visible;
}

.writer-tab .absolute {
    z-index: 30;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}