/* Bhagavad Gita - Shared Styles */
/* Common styles for mindmap and chapter pages */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    min-height: 100vh;
}

/* Container Styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.container-narrow {
    max-width: 900px;
}

/* Typography */
h1 {
    color: #ff6b35;
    margin-bottom: 10px;
    font-size: 2.5em;
}

h1.chapter-title {
    font-size: 2.2em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

.chapter-meta {
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

/* Navigation */
.back-button {
    display: inline-block;
    color: #ff6b35;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 600;
}

.back-button:hover {
    text-decoration: underline;
}

/* Introduction Box */
.intro {
    background: #fff5e6;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid #ff6b35;
}

.intro h2 {
    color: #ff6b35;
    margin-bottom: 10px;
}

/* Central Node (Mindmap) */
.central-node {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(255,107,53,0.4);
    margin-bottom: 20px;
}

/* Mindmap Layout */
.mindmap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Section Styles */
.section {
    margin: 30px 0;
}

.section-title {
    background: #4a5568;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
}

.section h2 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.5em;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.section p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

/* Chapters Grid */
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Chapter Cards */
.chapter-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #ff6b35;
}

.chapter-number {
    display: inline-block;
    background: #ff6b35;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.chapter-name {
    color: #2d3748;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.chapter-sanskrit {
    color: #718096;
    font-style: italic;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.chapter-description {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95em;
}

.verse-count {
    color: #805ad5;
    font-size: 0.85em;
    margin-top: 10px;
    font-weight: 600;
}

/* Verse Styles */
.verse {
    background: #fff5e6;
    border-left: 4px solid #ff6b35;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.verse-number {
    font-weight: bold;
    color: #ff6b35;
    margin-bottom: 8px;
    display: block;
    background: none;
    padding: 0;
    border-radius: 0;
}

.verse-text {
    font-style: italic;
    color: #4a5568;
    line-height: 1.8;
}

/* Key Points / Teachings Box */
.key-points,
.key-teachings {
    background: #e6fffa;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #38b2ac;
    margin: 20px 0;
}

.key-points h3,
.key-teachings h3 {
    color: #38b2ac;
    margin-bottom: 15px;
}

.key-points ul,
.key-teachings ul {
    color: #2d3748;
    line-height: 1.8;
    margin-left: 20px;
}

.key-teachings ul {
    list-style-position: inside;
    margin-left: 0;
}

/* Highlight Text */
.highlight {
    background: #fef3c7;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Chapter Navigation */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.chapter-nav a {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid #ff6b35;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.chapter-nav a:hover {
    background: #ff6b35;
    color: white;
}

.chapter-nav a.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* User Highlights */
.user-highlight {
    background: #fef3c7;
    padding: 1px 0;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.user-highlight:hover {
    background: #fde68a;
}

/* Highlight Action Button */
#highlight-btn {
    position: absolute;
    display: none;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #ff6b35;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#highlight-btn:hover {
    transform: scale(1.05);
    background: #e55a25;
}

/* Remove Highlight Tooltip */
#highlight-tooltip {
    position: absolute;
    display: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 1001;
}

.remove-highlight-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.remove-highlight-btn:hover {
    background: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    h1.chapter-title {
        font-size: 1.6em;
    }

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

    .chapter-nav {
        flex-direction: column;
        gap: 10px;
    }

    .chapter-nav a {
        text-align: center;
    }

    #highlight-btn {
        padding: 10px 18px;
        font-size: 16px;
    }
}
