/* ==========================================================
   DevType - 전역 스타일시트 (가독성 개선판)
   ========================================================== */

/* Sticky Footer 구조 */
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Sora', sans-serif;
    background: #080c10;
    color: #e6edf3;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;   /* ⭐ 글자 부드럽게 */
    -moz-osx-font-smoothing: grayscale;
}

.container {
    padding: 40px;
    flex: 1 0 auto;
}

/* ==========================================================
   Input / Textarea / Select - 가독성 강화
   ========================================================== */
input,
textarea,
select {
    background: #0d1117;
    border: 1.5px solid #30363d;
    color: #f0f6fc;                         /* ⭐ 더 밝은 흰색 */
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 14px;                         /* ⭐ 13 → 14 */
    font-family: inherit;
    outline: none;
    transition: all .2s;
    width: 100%;
    box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #00e5a0;
    box-shadow: 0 0 0 3px rgba(0, 229, 160, .15);
    background: #0d1117;
}

/* ⭐ placeholder 가독성 향상 */
input::placeholder,
textarea::placeholder {
    color: #6e7681;                          /* 기존 #484f58 → 더 밝게 */
    opacity: 1;
}

/* ⭐ label 강화 */
label {
    color: #b1bac4;                          /* 기존 #8b949e → 더 밝게 */
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ==========================================================
   Card - 대비 강화
   ========================================================== */
.card {
    background: #161b22;
    border: 1.5px solid #30363d;             /* ⭐ #21262d → #30363d (살짝 밝게) */
    border-radius: 12px;
    padding: 20px;
}

.card h3 {
    color: #f0f6fc;                          /* ⭐ 확실한 흰색 */
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.card p {
    color: #b1bac4;                          /* ⭐ 가독성 향상 */
    line-height: 1.7;
}

/* ==========================================================
   Buttons - hover 강화
   ========================================================== */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .18s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 13px;
    font-size: 12.5px;
}

/* ⭐ 메인 버튼 - 녹색 */
.btn-main {
    background: #00e5a0;
    color: #0a0f14;                          /* ⭐ 완전 검정에 가깝게 → 강한 대비 */
    font-weight: 700;
}

.btn-main:hover {
    background: #00fdb0;
    box-shadow: 0 0 16px rgba(0, 229, 160, .3);
    transform: translateY(-1px);
}

/* ⭐ 서브 버튼 */
.btn-sub {
    background: transparent;
    border: 1.5px solid #484f58;             /* ⭐ 더 진한 테두리 */
    color: #f0f6fc;                          /* ⭐ 더 밝은 글자 */
}

.btn-sub:hover {
    border-color: #00e5a0;
    color: #00e5a0;
    background: rgba(0, 229, 160, .06);
}

/* ⭐ Ghost 버튼 */
.btn-ghost {
    background: transparent;
    color: #b1bac4;
}

.btn-ghost:hover {
    background: #1c2330;
    color: #f0f6fc;
}

/* ⭐ Danger 버튼 */
.btn-danger {
    background: #da3633;
    color: #fff;
    font-weight: 700;
}

.btn-danger:hover {
    background: #f85149;
    box-shadow: 0 0 16px rgba(248, 81, 73, .3);
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
    background: linear-gradient(135deg, #0d1117, #0d1f12, #0d1117);
    border: 1.5px solid #30363d;
    border-radius: 14px;
    padding: 40px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 32px;
    font-family: 'JetBrains Mono', monospace;
    color: #ffffff;                          /* ⭐ 완전 흰색 */
    letter-spacing: -0.03em;
}

.hero h1 span {
    color: #00e5a0;
}

.hero p {
    color: #c9d1d9;                          /* ⭐ 기존보다 밝게 */
    font-size: 15px;
    line-height: 1.8;
    margin: 14px 0;
}

/* ==========================================================
   Stats - 통계 카드
   ========================================================== */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.stat {
    background: #161b22;
    border: 1.5px solid #30363d;
    padding: 18px 20px;                      /* ⭐ 여유 있게 */
    border-radius: 10px;
    transition: border-color .15s;
}

.stat:hover {
    border-color: #00e5a0;
}

.stat h3 {
    color: #ffffff;                          /* ⭐ 흰색 */
    font-size: 22px;                         /* ⭐ 크게 */
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat p {
    color: #8b949e;
    font-size: 13px;
    margin: 0;
}

/* ==========================================================
   Bottom 카드
   ========================================================== */
.bottom {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

/* ==========================================================
   Badge (배지)
   ========================================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;                        /* ⭐ 굵게 */
    letter-spacing: 0.02em;
    background: rgba(88, 166, 255, .15);
    color: #79c0ff;                          /* ⭐ 더 밝은 파란색 */
    border: 1px solid rgba(88, 166, 255, .3);
}

.badge-green {
    background: rgba(0, 229, 160, .15);
    color: #3fb950;
    border: 1px solid rgba(0, 229, 160, .3);
}

.badge-blue {
    background: rgba(88, 166, 255, .15);
    color: #79c0ff;
    border: 1px solid rgba(88, 166, 255, .3);
}

.badge-yellow {
    background: rgba(227, 179, 65, .15);
    color: #f0d264;
    border: 1px solid rgba(227, 179, 65, .3);
}

.badge-orange {
    background: rgba(240, 136, 62, .15);
    color: #ffa657;
    border: 1px solid rgba(240, 136, 62, .3);
}

.badge-red {
    background: rgba(248, 81, 73, .15);
    color: #ff7b72;
    border: 1px solid rgba(248, 81, 73, .3);
}

/* ==========================================================
   Table - 가독성 강화
   ========================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;                        /* ⭐ 굵게 */
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #8b949e;
    padding: 12px 16px;                      /* ⭐ 여유 있게 */
    border-bottom: 1.5px solid #30363d;
    background: #0d1117;                     /* ⭐ 헤더 배경 */
}

td {
    padding: 13px 16px;                      /* ⭐ 여유 있게 */
    border-bottom: 1px solid #21262d;
    color: #c9d1d9;                          /* ⭐ 더 밝게 */
}

tbody tr {
    transition: background .15s;
}

tbody tr:hover td {
    background: #1c2330;
    color: #f0f6fc;
}

tr:last-child td {
    border-bottom: none;
}

/* ==========================================================
   Link 스타일
   ========================================================== */
a {
    color: #58a6ff;
    transition: color .15s;
}

a:hover {
    color: #79c0ff;
}

.accent {
    color: #00e5a0;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================
   상단 네비게이션 - 가독성 강화
   ========================================================== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 58px;
    padding: 0 24px;
    background: rgba(8, 12, 16, .95);
    backdrop-filter: blur(12px);
    border-bottom: 1.5px solid #30363d;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-nav .logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -.02em;
    color: #ffffff;                          /* ⭐ 완전 흰색 */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.top-nav .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #00e5a0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.top-nav .logo .accent { color: #00e5a0; }

.top-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.top-nav .nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-right: 8px;
}

.top-nav .nav-menu a {
    padding: 8px 13px;
    color: #c9d1d9;                          /* ⭐ 기존 #8b949e → 확 밝게 */
    text-decoration: none;
    font-size: 14px;                         /* ⭐ 13.5 → 14 */
    font-weight: 500;
    border-radius: 7px;
    transition: all .15s;
    white-space: nowrap;
}

.top-nav .nav-menu a:hover {
    color: #ffffff;                          /* ⭐ 호버 시 완전 흰색 */
    background: #1c2330;
}

.top-nav .nav-menu a.active {
    color: #00e5a0;
    background: rgba(0, 229, 160, .15);
    font-weight: 700;
}

.top-nav .nav-user-info {
    font-size: 13.5px;                       /* ⭐ 조금 크게 */
    color: #c9d1d9;                          /* ⭐ 밝게 */
    margin-right: 8px;
    white-space: nowrap;
    font-weight: 500;
}

/* 햄버거 버튼 */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #f0f6fc;                          /* ⭐ 밝게 */
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
}

/* ==========================================================
   Footer - 가독성 강화
   ========================================================== */
.footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 32px 20px;
    background: #0a0f14;                     /* ⭐ 더 진하게 */
    color: #8b949e;
    text-align: center;
    font-size: 13px;
    border-top: 1.5px solid #30363d;
}

.footer strong {
    color: #f0f6fc;                          /* ⭐ 회사명 강조 */
    font-size: 15px;
}

.footer-menu {
    margin: 14px 0;
}

.footer-menu a {
    margin: 0 10px;
    color: #b1bac4;                          /* ⭐ 밝게 */
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}

.footer-menu a:hover {
    color: #58a6ff;
}

/* ==========================================================
   스크롤바 스타일 (크롬)
   ========================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #080c10;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* ==========================================================
   Accessibility - 포커스 상태
   ========================================================== */
*:focus-visible {
    outline: 2px solid #00e5a0;
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible {
    outline-offset: 3px;
}

/* ==========================================================
   에러 / 알림 박스
   ========================================================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    margin: 10px 0;
}

.alert-error {
    background: rgba(248, 81, 73, .1);
    border: 1px solid rgba(248, 81, 73, .3);
    color: #ff7b72;
}

.alert-info {
    background: rgba(88, 166, 255, .1);
    border: 1px solid rgba(88, 166, 255, .3);
    color: #79c0ff;
}

.alert-success {
    background: rgba(0, 229, 160, .1);
    border: 1px solid rgba(0, 229, 160, .3);
    color: #3fb950;
}

/* ==========================================================
   반응형 (태블릿 이하)
   ========================================================== */
@media (max-width: 900px) {
    .top-nav {
        padding: 0 16px;
    }

    .nav-toggle {
        display: block;
    }

    .top-nav .nav-right {
        position: absolute;
        top: 58px;
        right: 0;
        background: #0d1117;
        border: 1px solid #30363d;
        border-right: none;
        border-radius: 0 0 0 12px;
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        min-width: 220px;
        display: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
    }

    .top-nav .nav-right.open {
        display: flex;
    }

    .top-nav .nav-menu {
        flex-direction: column;
        gap: 2px;
        margin-right: 0;
        border-bottom: 1px solid #30363d;
        padding-bottom: 10px;
        margin-bottom: 4px;
    }

    .top-nav .nav-menu a {
        padding: 11px 14px;
        width: 100%;
    }

    .top-nav .nav-user-info {
        display: block;
        margin: 0 0 4px 14px;
        font-size: 12.5px;
    }

    .container {
        padding: 20px 16px 40px;
    }

    .hero {
        padding: 28px 20px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .bottom {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 19px;
    }

    .btn {
        font-size: 13px;
    }
}

/* ==========================================================
   🔥 MyPage - AI 분석 영역 확장 (DevType 전용)
   ========================================================== */



/* 🔥 AI 분석 박스 */
#aiAnalysisBox {
    flex: 1 !important;           /* ⭐ 핵심: 남은 공간 전부 사용 */
    min-height: 100px;

    display: flex;
    flex-direction: column;       /* ⭐ 세로 정렬 */
    justify-content: center;      /* ⭐ 중앙 정렬 */

    border-left: 1px solid #21262d;
    padding-left: 16px;
}

/* AI 내부 텍스트 정리 (선택) */
#aiAnalysisBox p {
    margin: 4px 0;
    font-size: 13px;
    color: #c9d1d9;
}

/* 🔥 프로필 영역은 크기 유지 (핵심) */
.card > div > div:first-child {
    flex: 0 0 auto;   /* 🔥 줄어들지도, 늘어나지도 않음 */
}

/* 🔥 AI는 남은 공간 전부 사용 */
#aiAnalysisBox {
    flex: 1;
}

/* ==========================================================
   🔥 MyPage 전용 - 프로필 + AI 영역
   ========================================================== */

/* 👉 마이페이지 상단 카드만 flex 적용 */
.container > .card:first-child > div {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 👉 프로필 영역: 크기 유지 */
.container > .card:first-child > div > div:first-child {
    flex: 0 0 auto;
}

/* =========================
   🔥 MyPage 상단 영역 전용
   ========================= */
.mypage-top {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 프로필은 그대로 유지 */
.mypage-top > div:first-child {
    flex: 0 0 auto;
}

/* 👉 AI 영역: 남은 공간 전부 */
#aiAnalysisBox {
    flex: 1;
    display: flex;
    align-items: center;
}