/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR',
                 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #333;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe4cc 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(255, 165, 0, 0.1);
}

/* Header */
header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 3px solid #FFA500;
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
    margin: -20px -20px 30px -20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.app-name {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 20px;
    border-radius: 20px;
    display: inline-block;
}

.update-date {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Navigation Table of Contents */
.toc {
    background: #f8f9fa;
    border: 2px solid #FFA500;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.toc h3 {
    color: #FFA500;
    margin-bottom: 15px;
    font-size: 1.3em;
}

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

.toc li {
    margin: 8px 0;
}

.toc a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
}

.toc a:hover {
    background: #FFA500;
    color: white;
    padding-left: 20px;
}

/* Main Content */
main {
    padding: 20px 0;
}

.chapter {
    margin-bottom: 50px;
    scroll-margin-top: 20px;
}

.chapter h2 {
    color: #FFA500;
    font-size: 2em;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #FFA500;
}

article {
    margin-bottom: 35px;
    background: #fafafa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #FFD4A3;
}

article h3 {
    color: #FF8C00;
    font-size: 1.4em;
    margin-bottom: 15px;
}

article h4 {
    color: #333;
    font-size: 1.2em;
    margin: 15px 0 10px 0;
}

article p {
    margin-bottom: 15px;
    text-align: justify;
}

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

article li {
    margin: 10px 0;
    line-height: 1.8;
}

/* Service Grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.service-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #FFE4B5;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 165, 0, 0.3);
    border-color: #FFA500;
}

.service-item h4 {
    color: #FFA500;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.service-item ul {
    list-style: none;
    margin-left: 0;
}

.service-item li {
    padding-left: 20px;
    position: relative;
}

.service-item li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #FFA500;
}

/* Info Boxes */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.warning-box {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.prohibited-box {
    background: #ffebee;
    border-left: 4px solid #f44336;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.important-box {
    background: #fffaf0;
    border: 2px solid #FFA500;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
}

.disclaimer-box {
    background: #f5f5f5;
    border: 1px dashed #999;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

/* Supplementary Section */
.supplementary {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 3px solid #FFA500;
}

.supplementary h2 {
    color: #FFA500;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.version-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
}

.version-info h3 {
    color: #FF8C00;
    margin-bottom: 10px;
}

.version-list {
    list-style: none;
    margin-left: 0;
    padding: 10px;
    background: white;
    border-radius: 5px;
}

.version-list li {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.version-list li:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    margin: 50px -20px -20px -20px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: white;
    padding: 30px 20px 20px 20px;
}

.footer-content {
    text-align: center;
    margin-bottom: 20px;
}

.footer-content p {
    margin: 5px 0;
}

.footer-links {
    margin: 15px 0;
}

.footer-links a {
    color: #FFA500;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #FFD700;
    text-decoration: underline;
}

.footer-links span {
    color: #999;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #666;
    opacity: 0.8;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #FFA500;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: none;
    z-index: 1000;
}

.scroll-top:hover {
    background: #FF8C00;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Links */
a {
    color: #FFA500;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #FF8C00;
    text-decoration: underline;
}

/* Responsive Design */
@media (min-width: 1024px) {
    .container {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto;
        grid-template-areas:
            "header"
            "toc"
            "main"
            "footer";
    }

    header {
        grid-area: header;
    }

    .toc {
        grid-area: toc;
        position: static;
    }

    main {
        grid-area: main;
    }

    footer {
        grid-area: footer;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 30px 10px;
        margin: -10px -10px 20px -10px;
    }

    header h1 {
        font-size: 2em;
    }

    .app-name {
        font-size: 1.2em;
    }

    .toc {
        position: static;
        margin-bottom: 20px;
    }

    .chapter h2 {
        font-size: 1.6em;
    }

    article {
        padding: 15px;
    }

    article h3 {
        font-size: 1.2em;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    footer {
        margin: 30px -10px -10px -10px;
        padding: 20px 10px;
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    .app-name {
        font-size: 1em;
        padding: 3px 15px;
    }

    .toc {
        padding: 15px;
    }

    .toc a {
        font-size: 0.9em;
        padding: 6px 10px;
    }

    article {
        padding: 12px;
        margin-bottom: 20px;
    }

    article h3 {
        font-size: 1.1em;
    }

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

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .container {
        box-shadow: none;
        max-width: 100%;
    }

    header {
        background: none;
        color: #333;
        border-bottom: 2px solid #333;
        page-break-after: always;
    }

    .toc {
        page-break-after: always;
    }

    .chapter {
        page-break-before: always;
    }

    article {
        page-break-inside: avoid;
    }

    .scroll-top {
        display: none !important;
    }

    footer {
        background: none;
        color: #333;
        border-top: 2px solid #333;
        margin-top: 50px;
    }

    a {
        color: #333;
        text-decoration: underline;
    }
}