:root{
    --accent:#111827; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', 'Helvetica Neue', Arial, sans-serif;
    --header-height: 56px; 
    --transition-duration: 0.3s; 
    --blue-accent: #1d6fef; /* 개발중 (MinsuGPT) */
    --yellow-accent: #ffc107; /* 논의중 (Unknown) */
    
    /* 추가된 메뉴 관련 변수 */
    --pink-accent: #ff69b4; 
    --light-pink: #ffe6f0; 
    --darker-pink: #ff99cc; 
}

/* 폰트 적용 */
body :is(.header-title, .plus-btn, .action-btn, .message-text, .input-container textarea, .modal-grid-item, .modal-option, .thinking-indicator-text, button, .project-card, .project-page-title) {
    font-family: 'Elms Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', 'Helvetica Neue', Arial, sans-serif;
}

/* Material Symbols 아이콘 스타일 */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* 전체 레이아웃 */
* { box-sizing:border-box; -webkit-tap-highlight-color: transparent; }
body {
    margin:0; 
    background: #ffffff; 
    color:var(--accent); min-height:100vh;
    padding:0; overflow-x: hidden; 
    display: flex; 
    justify-content: flex-start;
    flex-direction: column;
}

/* .phone 컨테이너에서 max-width 제거하여 전체 너비 사용 */
.phone{
    width:100%; 
    min-height:100vh; 
    position:relative; 
    margin: 0;
    display:flex; 
    flex-direction:column;
}

/* --- 헤더 스타일 --- */
.header{
    display:flex; 
    justify-content:space-between; 
    align-items:center; 
    padding:10px 16px; 
    height: var(--header-height); 
    border-bottom:none;
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    z-index: 1000; 
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(8px); 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); 
}

.header-icon{ 
    width:32px; height:32px; display:flex; align-items:center; justify-content:center; color:#111827; cursor: pointer; flex-shrink: 0; 
}
.header-left-group { display: flex; align-items: center; }
.header-title a { 
    font-size: 18px; font-weight: 600; color: var(--accent); margin-left: 0; flex-shrink: 0; 
    text-decoration: none; 
}
.header-right-group { display: flex; align-items: center; gap: 10px; }
.header-center { text-align: left; display: flex; justify-content: flex-start; align-items: center; margin-left: 10px; }

/* --- 메뉴 활성화 링크 스타일 추가 --- */
.action-btn.active-link {
    background-color: var(--pink-accent); 
    color: #ffffff; 
    font-weight: 700;
}

.action-btn.active-link:hover {
    color: #ffffff; 
    background-color: var(--darker-pink);
}

.mobile-menu-dropdown a.active-link {
    background-color: var(--pink-accent); 
    color: #ffffff; 
    border: 1px solid var(--pink-accent);
}

.mobile-menu-dropdown a.active-link:hover {
    background-color: var(--darker-pink);
}
/* ------------------------------------------- */

/* PC 액션 버튼 스타일 */
.action-btn { 
    background-color: transparent; 
    color: var(--accent); 
    font-weight: 600; 
    padding: 4px 10px; 
    border-radius: 16px; 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    font-size: 14px; 
    cursor: pointer; 
    line-height: 1.2; 
    margin-left: 10px;
    text-decoration: none; 
    transition: color 0.2s;
}

.action-btn:hover {
    color: var(--pink-accent); 
}

/* PC 버전 메뉴 링크 컨테이너 */
.pc-menu-links {
    display: flex; 
    align-items: center; 
    margin-left: 20px; 
}

/* --- 모바일 드롭다운 메뉴 스타일 --- */
.mobile-menu-dropdown {
    position: fixed;
    top: var(--header-height); 
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
    
    max-height: 0;
    opacity: 0;
    border-radius: 0 0 20px 20px; 
    overflow: hidden; 
    
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.1s ease-out,
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    padding: 0 16px; 
}

.mobile-menu-dropdown.is-open {
    max-height: 400px; 
    opacity: 1;
    padding: 10px 16px 16px 16px; 
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease-in, 
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-dropdown a {
    display: block;
    margin-bottom: 10px; 
    padding: 12px 20px;
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    
    background-color: var(--light-pink); 
    border: 1px solid var(--darker-pink); 
    border-radius: 12px; 
    
    transition: background-color 0.2s, transform 0.1s;
}

.mobile-menu-dropdown a:hover {
    background-color: #ffdaeb; 
    transform: translateY(-1px);
}

.mobile-menu-dropdown a:last-child {
    margin-bottom: 0;
}

/* --- 메인 콘텐츠 영역 --- */
main {
    padding-top: var(--header-height); 
    padding-bottom: 20px; 
    width: 100%; 
    flex-grow: 1; 
    text-align: left;
    
    max-width: 1200px; 
    margin: 0 auto;
    padding-left: 16px; 
    padding-right: 16px; 
}

/* 'Project' 텍스트 스타일 */
.project-page-title {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--accent);
    margin-top: 20px;
    margin-bottom: 20px;
    display: block; 
    text-align: left;
    margin-left: 10px; 
}

/* --- 프로젝트 카드 컨테이너 --- */
.project-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 20px;
    width: 100%;
}

/* --- 프로젝트 카드 스타일 --- */
.project-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%; 
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
}

.status-container {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

/* 상태별 색상 */
.status-text.developing { color: var(--blue-accent); }
.status-icon.developing { color: var(--blue-accent); }

.status-text.discussing { color: var(--yellow-accent); }
.status-icon.discussing { color: var(--yellow-accent); }

.card-description {
    color: #555;
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; 
}

/* --- 버튼 스타일 --- */
.use-button {
    padding: 10px 25px; 
    background-color: transparent; 
    color: var(--accent); 
    border: 2px solid var(--accent); 
    border-radius: 50px; 
    font-size: 1.1em; 
    font-weight: 600;
    cursor: pointer; 
    transition: background-color var(--transition-duration), color var(--transition-duration), transform 0.1s; 
    box-shadow: none; 
    text-decoration: none;
    display: inline-flex;
    align-self: flex-start; 
    align-items: center;
    justify-content: center;
    
    /* 텍스트 줄바꿈 방지 */
    white-space: nowrap; 
}

/* 호버 시 스타일 변경: 배경 검은색, 텍스트 흰색 */
.use-button:not(.disabled-button):hover { 
    background-color: var(--accent); 
    color: #ffffff;
    transform: translateY(-1px);
}
.use-button:not(.disabled-button):active {
    transform: translateY(0);
}

/* 비활성화된 버튼 스타일 */
.disabled-button {
    cursor: default;
    opacity: 0.6; 
    pointer-events: none; 
    background-color: #f1f1f1 !important; 
    color: #888888 !important; 
    border-color: #d0d0d0 !important; 
}

/* --- 미디어 쿼리 및 PC/모바일 분리 설정 --- */

/* 모바일 환경 (768px 이하): 메뉴 아이콘 표시, PC 버튼 숨김 */
@media (max-width: 768px) {
    .pc-menu-links {
        display: none; 
    }
    .mobile-only {
        /* mobile-only는 HTML에서 .header-icon과 .menu-icon 클래스와 함께 사용됨 */
        visibility: visible;
        display: flex; 
    }
    .project-page-title { 
        font-size: 1.8em; 
        margin-top: 15px; 
        margin-bottom: 15px;
        margin-left: 0; 
    }
    .project-grid {
        max-width: 400px; 
        margin: 0 auto; 
    }
    
    /* 추가: 모바일 환경 (600px 이하)에서 버튼 크기 더 작게 조정 */
    @media (max-width: 600px) {
        .use-button { 
            padding: 6px 15px; /* 패딩을 더 줄여 버튼 크기 축소 */
            font-size: 0.9em; /* 폰트 크기를 더 작게 조정하여 한 줄에 표시 유도 */
        }
    }
}

/* PC 환경 (769px 이상): 메뉴 아이콘 숨김, PC 버튼 표시 */
@media (min-width: 769px) {
    .menu-icon {
        display: none !important; 
    }
    .pc-menu-links {
        display: flex; 
    }
    .header {
        justify-content: flex-start; 
        padding: 10px 30px; 
    }
    .mobile-menu-dropdown {
        display: none !important; 
    }
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%; 
        margin: 0; 
    }
}
