@font-face {
    font-family: 'Fighting Turbo';
    src: url('assets/fightingSpirit.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #F7F4F1;
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 30px;
    left: 5px;
    z-index: 1001;
    background-color: rgba(0, 16, 24, 0.1);
    border: none;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: white;
    margin: 2px 0;
    transition: 0.3s;
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Sidebar Styles */
.sidebar {
    width: 256px;
    background-color: #001018;
    color: white;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.logo {
    padding: 8px;
    background-color: #001018;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: filter 0.2s ease;
    min-height: 80px;
}

.logo:hover {
    filter: brightness(1.2);
}

.logo-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Navigation Styles */
.nav {
    padding: 8px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    color: #d1d5db;
    border-bottom: 1px solid #4b5563;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    cursor: pointer;
    position: relative;
}

.nav-item:hover {
    background-color: #374151;
}

.nav-item.active {
    background-color: #374151;
}

.nav-item.has-submenu {
    font-weight: 500;
}

.nav-item .arrow {
    position: absolute;
    left: 4px;
    color: #f97316;
    font-weight: bold;
    font-size: 18px;
}

.sub-nav-item {
    padding: 4px 16px 4px 32px;
    font-size: 14px;
    color: #9ca3af;
    border-bottom: 1px solid #4b5563;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sub-nav-item:hover {
    background-color: #374151;
}

.sub-nav-item.active {
    background-color: #374151;
}

.sub-nav-item .arrow {
    position: absolute;
    left: 20px;
    color: #f97316;
    font-weight: bold;
    font-size: 14px;
}

.deep-sub-nav-item {
    padding: 4px 16px 4px 48px;
    font-size: 12px;
    color: #6b7280;
    border-bottom: 1px solid #4b5563;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.deep-sub-nav-item:hover {
    background-color: #374151;
}

.deep-sub-nav-item.active {
    background-color: #374151;
}

.deep-sub-nav-item .arrow {
    position: absolute;
    left: 36px;
    color: #f97316;
    font-weight: bold;
    font-size: 12px;
}

.deeper-sub-nav-item {
    padding: 4px 16px 4px 64px;
    font-size: 11px;
    color: #4b5563;
    border-bottom: 1px solid #4b5563;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    cursor: pointer;
    position: relative;
}

.deeper-sub-nav-item:hover {
    background-color: #374151;
}

.deeper-sub-nav-item.active {
    background-color: #374151;
}

.deeper-sub-nav-item .arrow {
    position: absolute;
    left: 52px;
    color: #f97316;
    font-weight: bold;
    font-size: 10px;
}

.expand-btn {
    cursor: pointer;
    padding: 4px;
    color: #d1d5db;
}

.expand-btn:hover {
    color: white;
}

.submenu {
    display: none;
}

.submenu.expanded {
    display: block;
}

/* Search Bar */
.search-container {
    padding: 8px 16px;
    border-bottom: 1px solid #4b5563;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
}

.search-bar {
    display: flex;
}

.search-input {
    flex: 1;
    padding: 4px 8px;
    font-size: 14px;
    background-color: #374151;
    color: #e5e7eb;
    border: 1px solid #4b5563;
    border-radius: 4px 0 0 4px;
}

.search-input:focus {
    background-color: #4b5563;
    outline: none;
}

.search-btn {
    padding: 4px 8px;
    background-color: #4b5563;
    color: #e5e7eb;
    border: 1px solid #4b5563;
    border-left: 0;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-btn:hover {
    background-color: #6b7280;
}

/* Footer Links */
.footer-links {
    margin-top: 16px;
    padding: 0 16px;
}

.footer-link {
    font-size: 12px;
    color: #9ca3af;
    padding: 4px 0;
    border-bottom: 1px solid #4b5563;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
}

.footer-note {
    margin-top: 16px;
    padding: 0 16px;
    font-size: 12px;
    color: #6b7280;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid #4b5563;
}

.copyright {
    font-size: 12px;
    color: #9ca3af;
    text-align: left;
    padding-left: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    background-color: #f3f4f6;
}

.header {
    background: linear-gradient(135deg, #001018 0%, #1a2332 100%);
    color: white;
    padding: 20px;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f97316, transparent);
}

.header h1 {
    font-family: 'Fighting Turbo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(24px, 5vw, 52px);
    font-weight: bold;
    margin: 0;
}

.header-buttons {
    margin-top: 8px;
    display: flex;
    gap: 16px;
    justify-content: center;
}

.header-btn {
    background-color: #6b7280;
    padding: 4px 12px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    color: white;
    cursor: pointer;
}

.header-btn.orange {
    background-color: #ea580c;
}

.content-area {
    padding: 24px;
    background-color: #e5e7eb;
    min-height: calc(100vh - 150px);
}

.content-card {
    background-color: #F7F4F1;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.content-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.content-main {
    flex: 1;
}

.content-main h2 {
    font-size: 32px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 16px;
}

.content-main h3 {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 12px;
    margin-top: 24px;
}

.content-main p {
    color: #374151;
    margin-bottom: 16px;
    line-height: 1.6;
}

.book-cover {
    margin-left: 24px;
    flex-shrink: 0;
}

.book-placeholder {
    width: 128px;
    height: 192px;
    background-color: #1f2937;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.book-title {
    font-size: 14px;
    font-weight: bold;
}

.book-subtitle {
    font-size: 12px;
}

.book-author {
    margin-top: 8px;
    font-size: 12px;
}

.merch-items {
    margin-top: 32px;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

.merch-item {
    width: 96px;
    height: 96px;
    background-color: #1f2937;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    text-align: center;
}

.merch-item:nth-child(even) {
    background-color: #374151;
}

.hidden {
    display: none;
}

/* Contact Form Styles */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #1f2937;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.required {
    color: #ef4444;
}

.submit-btn {
    background-color: #f97316;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #ea580c;
}

.submit-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.form-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

.contact-form p {
    color: #374151;
    margin-bottom: 16px;
    line-height: 1.6;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.form-message.loading {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.submit-btn.loading {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Loading indicator for markdown content */
.loading {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px;
}

/* Markdown content styling */
#markdown-rendered {
    line-height: 1.6;
}

#markdown-rendered h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f97316;
    padding-bottom: 0.5rem;
}

#markdown-rendered h2 {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#markdown-rendered h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

#markdown-rendered p {
    color: #374151;
    margin-bottom: 1rem;
}

#markdown-rendered ul, #markdown-rendered ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

#markdown-rendered li {
    color: #374151;
    margin-bottom: 0.5rem;
}

#markdown-rendered blockquote {
    border-left: 4px solid #f97316;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #6b7280;
}

#markdown-rendered code {
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

#markdown-rendered pre {
    background-color: #1f2937;
    color: #e5e7eb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

#markdown-rendered pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        width: 100%;
        margin-left: 0;
    }
    
    .content-area {
        padding: 16px;
        margin-top: 0;
    }
    
    .content-layout {
        flex-direction: column;
    }
    
    .book-cover {
        margin-left: 0;
        margin-top: 24px;
        display: flex;
        justify-content: center;
    }
    
    .contact-form {
        max-width: 100%;
    }
    
    /* Overlay for mobile menu */
    body.mobile-menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
}

@media (max-width: 480px) {
    .content-card {
        padding: 16px;
    }
    
    .header {
        padding: 8px 16px;
    }
    
    .content-main h2 {
        font-size: 24px;
    }
    
    .content-main h3 {
        font-size: 18px;
    }
}