/* 기본 리셋 및 폰트 설정 */
:root {
    --primary-color: #0078D7;
    --primary-hover: #005a9e;
    --bg-color: #f0f2f5;
    --text-main: #2c3e50;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

html {
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    padding: 40px 20px;
    font-family: 'Noto Sans KR', "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6em;
    color: var(--text-main);
    background-color: var(--bg-color);
}

/* 메인 컨테이너 (흰색 박스) */
.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 40px 50px;
}

/* 헤더 영역 */
.main-header {
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 25px;
    margin-bottom: 35px;
}

.main-header h1 {
    margin: 0;
    color: #111;
    font-size: 2.8em;
    font-weight: 700;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1em;
    margin: 10px 0 5px;
}

.highlight-text {
    color: #ff6b6b;
    font-size: 0.95em;
    margin: 0;
}

/* JeusManager 다운로드 Hero 섹션 */
.hero-section {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 12px;
    padding: 35px 30px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5);
    border: 1px solid #7dd3fc;
}

.hero-content h2 {
    margin-top: 0;
    color: #0369a1;
    font-size: 1.8em;
}

.hero-content p {
    color: #0c4a6e;
    margin-bottom: 20px;
}

.btn-download {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 120, 215, 0.2);
}

.btn-download:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 120, 215, 0.3);
}

/* 앱 목록 섹션 */
.apps-section h2 {
    border-left: 5px solid var(--primary-color);
    padding-left: 12px;
    font-size: 1.5em;
    margin-bottom: 20px;
    margin-top: 40px;
}

/* 반응형 카드 그리드 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.app-card {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 20px;
    text-decoration: none;
    color: #334155;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.app-card:hover {
    background-color: #ffffff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

/* 모바일 화면 대응 */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    .app-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   FontAwesome 아이콘 전용 스타일
   ========================================================= */

.app-card i {
    margin-right: 12px;
    font-size: 1.3em;
    display: inline-block;
    width: 26px;
    text-align: center;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.app-card:hover i {
    transform: scale(1.15); /* 마우스 오버 시 아이콘 팝업 애니메이션 */
}

/* 각 제품별 브랜드 & 고유 컬러 지정 */
.ic-bubble   { color: #0078D7; } /* Windows Blue */
.ic-folder   { color: #F59E0B; } /* Warning Orange */
.ic-board    { color: #10B981; } /* Emerald Green */
.ic-bug      { color: #EF4444; } /* Red */
.ic-next     { color: #0082c9; } /* Nextcloud Blue */
.ic-own      { color: #1d2d44; } /* ownCloud Dark Blue */
.ic-db       { color: #f97316; } /* Database Orange */
.ic-gallery  { color: #f43f5e; } /* Rose */
.ic-wp       { color: #21759b; } /* WordPress Official Blue */
.ic-xe       { color: #64748b; } /* Slate Gray */
.ic-cart     { color: #8b5cf6; } /* Purple */
.ic-php      { color: #777bb4; font-size: 1.5em !important; } /* PHP Official Purple */
.ic-server   { color: #3b82f6; } /* Server Blue */

/* =========================================================
   관리자 모드 전용 호버 크리덴셜 스타일 (최종 완벽 수정본)
   ========================================================= */

.app-card {
    position: relative; 
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-right: 20px;
}

.app-card span.app-name {
    flex: 1;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-hover-badge {
    position: absolute;
    right: -180px;
    top: 50%;
    transform: translateY(-50%);
    width: 130px;
    background: #1e293b;
    color: #f8fafc;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.73em;
    font-family: monospace;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: right 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s ease;
    pointer-events: none;
    z-index: 10;
    box-sizing: border-box;
}

.admin-hover-badge div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-hover-badge strong {
    color: #38bdf8;
}

.app-card.admin-logged-in:hover .admin-hover-badge {
    right: 12px; 
    opacity: 1;
}

/* =========================================================
   그리드 내 전체 행을 차지하는 풀폭 카드 스타일 (JeusManager 다운로드 등)
   ========================================================= */

.app-card.full-width {
    grid-column: 1 / -1; /* 그리드의 처음부터 끝 컬럼까지 전체 확장 */
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border: 1px solid #7dd3fc;
    padding: 18px 24px;
    justify-content: space-between;
    align-items: center;
}

.app-card.full-width:hover {
    background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
    border-color: #0284c7;
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 120, 215, 0.15);
}

/* 모바일 화면 대응 */
@media (max-width: 600px) {
    .app-card.full-width {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}