/* 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.6;
    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;
}

.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: 5px 10px;
    border-radius: 5px;
}

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

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

section {
    margin-bottom: 40px;
    scroll-margin-top: 20px;
}

h2 {
    color: #FFA500;
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFA500;
}

h3 {
    color: #FF8C00;
    font-size: 1.3em;
    margin: 20px 0 15px 0;
}

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

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

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

li {
    margin: 8px 0;
}

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

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

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

.how-to-box {
    background: #f5fff5;
    border-left: 4px solid #27ae60;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
}

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

.purpose-item {
    background: #fff8f0;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #FFE4B5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.purpose-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 165, 0, 0.3);
}

.purpose-item h4 {
    color: #FFA500;
    margin-bottom: 10px;
}

.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.right-item {
    background: linear-gradient(135deg, #FFF8F0 0%, #FFEDD5 100%);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #FFD4A3;
    transition: all 0.3s ease;
}

.right-item:hover {
    background: linear-gradient(135deg, #FFD4A3 0%, #FFA500 100%);
    color: white;
}

.right-item h4 {
    margin-bottom: 5px;
}

/* Security Measures */
.security-measures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.measure {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #FFA500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.measure h4 {
    color: #FFA500;
    margin-bottom: 15px;
    font-size: 1.2em;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

thead {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

tbody tr:hover {
    background: #FFF8F0;
}

tbody tr:nth-child(even) {
    background: #FAFAFA;
}

/* Contact Section */
.contact-info {
    background: #F0F8FF;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
}

.contact-details {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.additional-contact {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #E0E0E0;
}

/* Version History */
.version-history {
    background: #F5F5F5;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.version-history h4 {
    color: #666;
    margin-bottom: 10px;
}

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

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

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

footer p {
    margin: 5px 0;
    text-align: center;
}

/* Responsive Design */
@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;
    }

    h2 {
        font-size: 1.5em;
    }

    .purpose-grid,
    .rights-grid,
    .security-measures {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 8px;
    }

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

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

    .toc {
        padding: 15px;
    }

    .toc a {
        font-size: 0.9em;
    }

    table {
        font-size: 0.8em;
    }

    th, td {
        padding: 6px;
    }
}

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

    .container {
        box-shadow: none;
    }

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

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

    section {
        page-break-inside: avoid;
    }

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