/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 헤더 스타일 */
header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 프로그램 메뉴 */
.program-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.program-link {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.program-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.program-icon {
    font-size: 2rem;
    margin-right: 15px;
    color: #667eea;
}

.program-name {
    font-size: 1.2rem;
    font-weight: 600;
}

/* 단축키 목록 */
.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.shortcut-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.shortcut-key {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-right: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shortcut-description h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
}

.shortcut-description .note {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* 뒤로가기 링크 */
.back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 0.8;
}

/* 데이터 없음 메시지 */
.no-data {
    text-align: center;
    color: white;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.no-data p {
    margin: 10px 0;
    font-size: 1.1rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .program-menu {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .program-link {
        padding: 15px;
    }

    .program-icon {
        font-size: 1.5rem;
    }

    .program-name {
        font-size: 1rem;
    }

    .shortcut-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .shortcut-key {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .program-menu {
        grid-template-columns: 1fr;
    }
}

/* 프로그램 목록과 3열 단축키 표 */
.page-header {
    text-align: left;
    padding: 36px 0 24px;
}

.page-header h1 {
    margin-bottom: 8px;
}

.eyebrow {
    color: #f7c873;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    margin-bottom: 12px;
}

.program-link {
    min-height: 104px;
    border-left: 5px solid #f7c873;
}

.program-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
}

.program-count {
    color: #7b8190;
    font-size: 0.85rem;
}

.program-arrow {
    color: #667eea;
    font-size: 1.5rem;
}

.detail-header {
    padding-bottom: 48px;
}

.detail-header > p:last-child {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.shortcut-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.shortcut-table {
    width: 100%;
    border-collapse: collapse;
    color: #333;
    text-align: left;
}

.shortcut-table th,
.shortcut-table td {
    padding: 8px 20px;
    border-bottom: 1px solid #eceef2;
    vertical-align: middle;
    box-sizing: border-box;
}

/* Ensure adequate spacing between columns */
.shortcut-table .shortcut-item > td {
    padding-right: 20px !important;
    padding-left: 20px !important;
}

.shortcut-table .shortcut-description,
.shortcut-table .shortcut-key,
.shortcut-table .note {
    padding: 17px 20px;
}

/* Add thicker border between columns for better separation */
.shortcut-table td {
    border-right: 2px solid #d1d5db;
}

.shortcut-table th {
    background: #222c3b;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.shortcut-table th:nth-child(1) { width: 28%; }
.shortcut-table th:nth-child(2) { width: 30%; }
.shortcut-table th:nth-child(3) { width: 42%; }

.shortcut-table tr:last-child td {
    border-bottom: 0;
}

.shortcut-table .shortcut-item {
    display: table-row;
    padding: 0;
    box-shadow: none;
    transition: background-color 0.2s ease;
}

.shortcut-table .shortcut-item:hover {
    background: #fff9ec;
    box-shadow: none;
}

.shortcut-table .shortcut-key {
    display: table-cell;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 17px 20px;
    background: transparent;
    color: #333;
    box-shadow: none;
}

kbd {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #d7dbe2;
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #f5f6f8;
    color: #253044;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0 4px; /* Add spacing between kbd elements */
}

.shortcut-table .note {
    color: #687080;
    font-size: 0.9rem;
    font-style: normal;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .page-header {
        padding-top: 20px;
    }

    .shortcut-table {
        display: block;
        min-width: 0;
    }

    .shortcut-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .shortcut-table tbody {
        display: block;
    }

    .shortcut-table tr:not(.shortcut-item) {
        display: block;
    }

    .shortcut-table .shortcut-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        padding: 12px 16px;
        border-bottom: 1px solid #eceef2;
    }

    .shortcut-table .shortcut-item td {
        display: block;
        width: auto;
        padding: 6px 0 16px 0;
        border: 0;
        overflow-wrap: anywhere;
        max-height: 80px;
        overflow-y: auto;
        color: #7b8190;
        font-size: 0.75rem;
        font-weight: 700;
    }

    .shortcut-table .shortcut-description::before {
        content: "기능: ";
        margin-bottom: 0px;
        margin-left: 0px;
    }

    .shortcut-table .shortcut-key::before {
        content: "단축키: ";
        margin-bottom: 0px;
        margin-left: 0px;
    }

    .shortcut-table .note::before {
        content: "설명: ";
        margin-bottom: 0;
        margin-left: 0;
        display: inline-block;
    }

    .shortcut-table .note {
        display: block;
    }

    .shortcut-table .shortcut-description,
    .shortcut-table .shortcut-key,
    .shortcut-table .note {
        margin-left: 24px;
    }

    .shortcut-table-wrap {
        overflow-x: hidden;
    }

    .shortcut-table th[colspan] {
        display: block;
        width: 100%;
    }

    /* Add spacing between first and second column in responsive view */
    @media (max-width: 768px) {
        .shortcut-table .shortcut-description {
            margin-right: 12px !important;
        }
        
        .shortcut-table .shortcut-key {
            margin-left: 12px !important;
        }
    }

    .program-copy {
        min-width: 0;
    }

    .program-name {
        overflow-wrap: anywhere;
    }
}

/* Responsive adjustments for column indentation */
@media (max-width: 768px) {
    .shortcut-table th,
    .shortcut-table td {
        padding: 12px 10px !important;
    }
    
    .shortcut-table .shortcut-description {
        padding-left: 8px !important;
    }
    
    .shortcut-table .shortcut-key,
    .shortcut-table .note {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Ensure proper column widths on mobile */
@media (max-width: 768px) {
    .shortcut-table th:nth-child(1) {
        width: 30% !important;
    }
    
    .shortcut-table th:nth-child(2) {
        width: 40% !important;
    }
    
    .shortcut-table th:nth-child(3) {
        width: 30% !important;
    }
}

/* Remove any extra left margin on mobile */
@media (max-width: 768px) {
    .shortcut-table .shortcut-description,
    .shortcut-table .shortcut-key,
    .shortcut-table .note {
        margin-left: 0 !important;
        padding-left: 8px !important;
    }
}

/* Add spacing to beginning of second column content */
@media (max-width: 768px) {
    .shortcut-table .shortcut-key {
        padding-left: 12px !important;
    }
}