/* TommyWIKI Global Styles - Sky Blue Theme */
:root {
    --primary-color: #0088cc; /* Sky Blue variant */
    --primary-hover: #0077b3;
    --bg-color: #f5f5f5;
    --content-bg: #ffffff;
    --text-color: #333333;
    --link-color: #0088cc;
    --border-color: #cccccc;
    --table-header-bg: #0088cc;
    --table-header-text: #ffffff;
    --toc-bg: #f8f9fa;
    --infobox-bg: #f9f9f9;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Navigation Bar */
.navbar {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .brand {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar .search-container {
    display: flex;
}

.navbar input[type="text"] {
    padding: 8px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.navbar button {
    padding: 8px 12px;
    border: none;
    background-color: #fff;
    color: var(--primary-color);
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
}

.navbar button:hover {
    background-color: #e0e0e0;
}

/* Layout Container */
.container-wrapper {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1000px;
    background-color: var(--content-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Document Title */
.document-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* Headings */
h1, h2, h3, h4 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #222;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}
th, td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

/* Infobox */
.infobox {
    width: 100%;
    max-width: 350px;
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
    border: 2px solid var(--primary-color);
    background-color: var(--infobox-bg);
    border-radius: 4px;
    overflow: hidden;
}
.infobox th, .infobox td {
    border: 1px solid var(--border-color);
}
.infobox thead th {
    background-color: var(--primary-color);
    color: var(--table-header-text);
    text-align: center;
    padding: 12px;
}
.infobox td:first-child {
    background-color: #e6f3ff;
    font-weight: bold;
    text-align: center;
    width: 35%;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 10px 15px;
    margin: 20px 0;
    background-color: #f0f8ff;
    color: #444;
    border-radius: 0 4px 4px 0;
}

/* Lists */
ul, ol {
    padding-left: 25px;
    margin-bottom: 15px;
}

/* Table of Contents (TOC) */
.toc {
    border: 1px solid var(--border-color);
    background-color: var(--toc-bg);
    padding: 15px 20px;
    margin-bottom: 30px;
    display: inline-block;
    border-radius: 4px;
    min-width: 250px;
}
.toc-title {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}
.toc ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}
.toc ul ul {
    padding-left: 20px;
}
.toc li {
    margin-bottom: 5px;
}

/* Utility */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}
s, del {
    color: #777;
}
small {
    font-size: 0.85em;
    color: #666;
}
sup {
    font-size: 0.8em;
    vertical-align: super;
}

/* Categories */
.categories {
    margin-top: 40px;
    padding: 15px;
    border: 1px solid var(--primary-color);
    background-color: #f0f8ff;
    border-radius: 4px;
}
.categories span {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container-wrapper {
        padding: 10px;
    }
    .container {
        padding: 15px;
        border-radius: 0;
        border: none;
    }
    .infobox {
        float: none;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-bottom: 20px;
    }
    .toc {
        width: 100%;
        box-sizing: border-box;
        display: block;
    }
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    .navbar .search-container {
        width: 100%;
    }
    .navbar input[type="text"] {
        flex-grow: 1;
    }
}
