:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --container-width: 1200px;
    --header-height: 80px;
    --footer-height: 60px;
    --sidebar-width: 300px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

header p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Main Content Layout */
main.container {
    display: flex;
    gap: 30px;
    margin: 30px auto;
    min-height: calc(100vh - var(--header-height) - var(--footer-height) - 60px);
    padding: 0 15px;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: white;
    border-radius: 8px;
    padding: 20px 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.sidebar li {
    margin-bottom: 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* 활성화된 항목 스타일 */
.sidebar li.active {
    background-color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    transform: translateX(5px);
}

.sidebar li.active a {
    color: white;
}

.sidebar li.active a i {
    color: white;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 5px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.sidebar a:hover {
    background-color: var(--light-color);
    color: var(--secondary-color);
}

.sidebar li.active a:hover {
    background-color: transparent;
}

.sidebar i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

/* Main Content */
.content {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-width: 0; /* 콘텐츠가 영역을 넘치지 않도록 */
}

section {
    margin-bottom: 40px;
}

section:last-child {
    margin-bottom: 0;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 60px;
    height: 2px;
    background-color: var(--secondary-color);
}

h3 {
    color: var(--primary-color);
    margin: 15px 0 10px;
}

ul, ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

/* Module Grid */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.module-card {
    background-color: var(--light-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.module-card:hover {
    transform: translateY(-5px);
}

.module-icon {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.module-card h3 {
    margin-top: 0;
}

.module-card p {
    margin-bottom: 15px;
    color: #555;
}

/* 모듈 상태 표시기 */
.module-status {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    display: inline-block;
}

.status-active {
    background-color: var(--success-color);
}

.status-error {
    background-color: var(--danger-color);
}

.status-inactive {
    background-color: var(--warning-color);
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--primary-color);
}

/* Code Blocks */
pre {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    border: 1px solid #e9ecef;
    overflow-x: auto;
    margin-bottom: 20px;
}

code {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.code-block {
    background-color: #f8f9fa;
    border-left: 4px solid var(--secondary-color);
}

/* Usage Examples */
.usage-example {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.usage-example h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
}

.usage-example pre {
    margin-bottom: 0;
    border: none;
    background-color: #fff;
}

/* Server Health Status */
#health-status {
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.health-ok {
    background-color: rgba(46, 204, 113, 0.2);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.health-error {
    background-color: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

.health-unknown {
    background-color: rgba(243, 156, 18, 0.2);
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

.status-text {
    margin-left: 10px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    text-align: center;
}

/* Responsive Design */
@media screen and (max-width: 960px) {
    :root {
        --sidebar-width: 260px;
    }
}

@media screen and (max-width: 768px) {
    main.container {
        flex-direction: column;
        padding: 0 10px;
    }

    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
        max-height: none;
        padding: 20px;
    }
    
    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .sidebar li {
        margin-bottom: 0;
        flex-grow: 1;
        min-width: 150px;
    }

    .module-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .container {
        padding: 0 10px;
    }

    .content {
        padding: 20px 15px;
    }
    
    .sidebar li {
        min-width: 100%;
    }
} 