/* ===== MAIN STYLES FOR CHARACTERGEN WEBSITE ===== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #e8eaf6;
    line-height: 1.6;
}

/* Layout Container */
.container {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas: 
        "sidebar header"
        "sidebar main"
        "sidebar footer";
    min-height: 100vh;
    gap: 20px;
    padding: 20px;
}

/* ===== HEADER STYLES ===== */
.header {
    grid-area: header;
    background: linear-gradient(135deg, #3f51b5 0%, #303f9f 100%);
    color: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(63, 81, 181, 0.4);
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* ===== NAVIGATION HEADER (Blog Template) ===== */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
    grid-area: sidebar;
    background: #2d2d44;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid #3f3f5a;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h2 {
    color: #7986cb;
    font-size: 1.6em;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #3f3f5a;
}

.sidebar ul {
    list-style: none;
}

/* System Group Styles */
.system-group {
    margin-bottom: 15px;
    border: 1px solid #3f3f5a;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
}

.system-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
    color: #b39ddb;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.system-header:hover {
    background: linear-gradient(135deg, #5c5c7a 0%, #6868aa 100%);
    border-left-color: #7986cb;
    color: #e1bee7;
}

.system-header.active {
    background: linear-gradient(135deg, #5c5c7a 0%, #6868aa 100%);
    border-left-color: #7986cb;
    color: #e1bee7;
}

.system-title {
    font-weight: bold;
    text-decoration: none;
    color: inherit;
}

.system-arrow {
    transition: transform 0.3s ease;
    font-size: 1.2em;
    color: #7986cb;
}

.system-arrow.rotated {
    transform: rotate(90deg);
}

.system-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #363650;
}

.system-content.expanded {
    max-height: 500px;
    padding: 10px 0;
}

.system-links li {
    margin-bottom: 0;
}

.system-links a {
    display: block;
    padding: 8px 20px;
    background: transparent;
    color: #a5a5a5;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.9em;
}

.system-links a:hover {
    background: rgba(121, 134, 203, 0.1);
    border-left-color: #7986cb;
    color: #c5cae9;
    transform: translateX(5px);
}

.system-links .character-sheet-link {
    color: #b39ddb;
    font-weight: bold;
    padding: 10px 20px;
    border-bottom: 1px solid #4a4a66;
}

.system-links .character-sheet-link:hover {
    color: #e1bee7;
    background: rgba(121, 134, 203, 0.15);
}

.system-links .official-link {
    color: #81c784;
}

.system-links .official-link:hover {
    color: #a5d6a7;
}

.coming-soon {
    padding: 15px;
    text-align: center;
    color: #a5a5a5;
    font-style: italic;
    font-size: 0.9em;
    background: rgba(60, 60, 80, 0.3);
    border-radius: 8px;
    border: 1px dashed #5a5a7a;
}

/* ===== MAIN CONTENT STYLES ===== */
.main {
    grid-area: main;
    background: #2d2d44;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid #3f3f5a;
}

.welcome-message {
    font-size: 1.2em;
    line-height: 1.6;
    color: #e8eaf6;
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid #7986cb;
    margin-bottom: 30px;
    text-align: center;
}

.kofi-link {
    color: #ff7043;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.kofi-link:hover {
    color: #ff5722;
    text-decoration: underline;
}

.email-link {
    color: #7986cb;
    text-decoration: none;
    font-weight: bold;
}

.email-link:hover {
    text-decoration: underline;
}

/* ===== FEATURES SECTION ===== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #5a5a7a;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(121, 134, 203, 0.2);
}

.feature-card h3 {
    color: #b39ddb;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.feature-card p {
    color: #c5cae9;
    line-height: 1.5;
}

/* ===== BLOG SECTION STYLES ===== */
.blog-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #3f3f5a;
}

.blog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    margin-bottom: 0;
}

.blog-header:hover {
    background: linear-gradient(135deg, #5c5c7a 0%, #6868aa 100%);
    border-left-color: #7986cb;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(121, 134, 203, 0.2);
}

.blog-header.active {
    background: linear-gradient(135deg, #5c5c7a 0%, #6868aa 100%);
    border-left-color: #7986cb;
}

.blog-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.blog-header h2 {
    color: #7986cb;
    font-size: 2em;
    margin: 0;
}

.blog-header p {
    color: #c5cae9;
    font-size: 1.1em;
    margin: 0;
}

.blog-arrow {
    transition: transform 0.3s ease;
    font-size: 1.5em;
    color: #7986cb;
}

.blog-arrow.rotated {
    transform: rotate(90deg);
}

.blog-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
    border-radius: 0 0 10px 10px;
    margin-top: 0;
}

.blog-content.expanded {
    max-height: 2000px;
    padding: 30px;
}

.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.blog-post {
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #5a5a7a;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.blog-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(121, 134, 203, 0.2);
}

.blog-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #a5a5a5;
}

.blog-post-category {
    background: #7986cb;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.blog-post h3 {
    color: #b39ddb;
    font-size: 1.4em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-post p {
    color: #c5cae9;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-post-link {
    color: #7986cb;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blog-post-link:hover {
    text-decoration: underline;
}

.blog-cta {
    text-align: center;
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
    border-radius: 10px;
    border: 1px solid #5a5a7a;
}

.blog-cta a {
    color: #7986cb;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
}

.blog-cta a:hover {
    text-decoration: underline;
}

/* ===== FOOTER STYLES ===== */
.footer {
    grid-area: footer;
    background: #2d2d44;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    border: 1px solid #3f3f5a;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

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

.footer-content p {
    margin-bottom: 10px;
    color: #c5cae9;
}

.footer-content a {
    color: #7986cb;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* ===== BREADCRUMB STYLES (Blog Template) ===== */
.breadcrumb {
    background: #2d2d44;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #3f3f5a;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumb a {
    color: #7986cb;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #a5a5a5;
    margin: 0 10px;
}

/* ===== ARTICLE STYLES (Blog Template) ===== */
.article {
    background: #2d2d44;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid #3f3f5a;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #3f3f5a;
}

.article-category {
    display: inline-block;
    background: #7986cb;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 15px;
}

.article-title {
    font-size: 2.5em;
    color: #b39ddb;
    margin-bottom: 15px;
    line-height: 1.2;
}

.article-meta {
    color: #a5a5a5;
    font-size: 1.1em;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: #e8eaf6;
}

.article-content h2 {
    color: #7986cb;
    font-size: 1.8em;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3f3f5a;
}

.article-content h3 {
    color: #b39ddb;
    font-size: 1.4em;
    margin: 30px 0 15px 0;
}

.article-content h4 {
    color: #c5cae9;
    font-size: 1.2em;
    margin: 25px 0 10px 0;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul, .article-content ol {
    margin: 20px 0 20px 30px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content a {
    color: #7986cb;
    text-decoration: none;
    font-weight: bold;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content blockquote {
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
    border-left: 4px solid #7986cb;
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 8px;
    font-style: italic;
}

.article-content code {
    background: #363650;
    color: #f4c842;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-content pre {
    background: #363650;
    color: #e8eaf6;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #5a5a7a;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.image-caption {
    text-align: center;
    font-style: italic;
    color: #a5a5a5;
    font-size: 0.9em;
    margin-top: -15px;
    margin-bottom: 25px;
}

.info-box {
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
    border: 1px solid #5a5a7a;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #3f3f5a;
    flex-wrap: wrap;
    gap: 20px;
}

.share-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-button {
    background: #7986cb;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.share-button:hover {
    background: #5c6bc0;
    transform: translateY(-2px);
}

.back-to-blog {
    background: #7986cb;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.back-to-blog:hover {
    background: #5c6bc0;
    transform: translateY(-2px);
}

/* ===== RELATED POSTS STYLES ===== */
.related-posts {
    background: #2d2d44;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid #3f3f5a;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.related-posts h3 {
    color: #7986cb;
    font-size: 1.6em;
    margin-bottom: 20px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.related-post {
    background: linear-gradient(135deg, #3f3f5a 0%, #4a4a66 100%);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #5a5a7a;
    transition: transform 0.3s ease;
}

.related-post:hover {
    transform: translateY(-3px);
}

.related-post h4 {
    color: #b39ddb;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.related-post p {
    color: #c5cae9;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.related-post a {
    color: #7986cb;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
}

.related-post a:hover {
    text-decoration: underline;
}

/* ===== AFFILIATE AND OFFICIAL LINK INDICATORS ===== */
.link-indicator {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: bold;
}

.affiliate-indicator {
    background: #fff3e0;
    color: #f57c00;
}

.official-indicator {
    background: #e8f5e8;
    color: #2e7d32;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 250px 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .sidebar {
        padding: 20px;
    }
    
    .main {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "main"
            "sidebar"
            "footer";
        padding: 10px;
    }
    
    .sidebar {
        position: static;
        margin-top: 20px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .main {
        padding: 25px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .blog-posts {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .article {
        padding: 25px;
        margin: 10px;
    }
    
    .article-title {
        font-size: 2em;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .header p {
        font-size: 1em;
    }
    
    .article-content {
        font-size: 1em;
    }
    
    .article-title {
        font-size: 1.6em;
    }
    
    .breadcrumb {
        padding: 10px 15px;
        font-size: 0.9em;
        margin: 10px;
    }
    
    .share-links {
        flex-direction: column;
        gap: 10px;
    }
}