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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1a1f3a 100%);
    color: #1f2937;
    min-height: 100vh;
    padding-top: 0;
}

/* Container Styles */
.container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 45px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    margin: 35px auto;
    max-width: 1300px;
}

/* Heading Styles */
h1 {
    color: #0f172a;
    margin-bottom: 15px;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #1e3a5f 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    color: #1e3a5f;
    margin-top: 35px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
    margin-right: 12px;
    vertical-align: middle;
}

h3 {
    color: #2d5a8c;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Typography */
.lead {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Card Styles */
.card {
    border: 0;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 30px;
}

.card-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.card-text {
    color: #6b7280;
    line-height: 1.6;
}

.card-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #1e3a5f;
    font-weight: 600;
    border-bottom: 1px solid #bfdbfe;
}

/* Topic Card Styles */
.topic-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #3b82f6;
    transition: all 0.3s ease;
}

.topic-card:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transform: translateX(4px);
}

.topic-title {
    color: #1e3a5f;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.topic-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-word {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Step Card Styles */
.step-card {
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.step-number {
    display: inline-block;
    background: #3b82f6;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    margin-right: 10px;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 0;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 0;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* Table Styles */
table {
    margin-bottom: 0;
}

th {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    font-weight: 600;
    color: #1e3a5f;
    border: 0;
    padding: 14px !important;
    font-size: 0.95rem;
}

td {
    padding: 12px 14px !important;
    border-color: #e5e7eb;
    color: #374151;
}

tr:nth-child(even) {
    background-color: #f9fafb;
}

tr:hover {
    background-color: #f3f4f6 !important;
    transition: background-color 0.2s ease;
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Badge Styles */
.metric-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    margin: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.warning-badge {
    background-color: #e74c3c;
}

.success-badge {
    background-color: #27ae60;
}

/* Sentiment Styles */
.sentiment-positive {
    color: #059669;
    font-weight: 700;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.sentiment-negative {
    color: #dc2626;
    font-weight: 700;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.sentiment-neutral {
    color: #6b7280;
    font-weight: 700;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Error Message Styles */
.error-message {
    padding: 16px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #7f1d1d;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

/* Driver Bar Styles */
.driver-bar {
    margin-bottom: 20px;
}

.driver-label {
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e3a5f;
    font-size: 0.95rem;
}

.driver-bar-outer {
    background: linear-gradient(90deg, #e5e7eb 0%, #d1d5db 100%);
    border-radius: 8px;
    overflow: hidden;
    height: 32px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.driver-bar-inner {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: white;
    font-weight: 700;
    font-size: 0.85em;
}

/* Feature Box Styles (for how_to.html) */
.feature-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.feature-box:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.feature-box h4 {
    color: #1e3a5f;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-box p {
    color: #6b7280;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Tip and Warning Boxes */
.tip-box {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    color: #0c4a6e;
}

.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    color: #78350f;
}

/* Alert Styles */
.alert-info {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
    border: 1px solid #06b6d4;
    border-radius: 8px;
    color: #164e63;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.1);
}

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

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .card-body {
        padding: 20px;
    }
}

/* Code and Lists (for how_to.html) */
code {
    background: #f3f4f6;
    color: #e11d48;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

pre code {
    background: none;
    color: #e11d48;
    font-family: 'Courier New', monospace;
}

ol, ul {
    color: #6b7280;
    line-height: 1.8;
}

li {
    margin-bottom: 10px;
}

/* Table of Contents */
.toc {
    background: #f0f9ff;
    border: 2px solid #bfdbfe;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.toc h3 {
    margin-top: 0;
    color: #1e3a5f;
}

.toc ul {
    margin-bottom: 0;
}

.toc a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.toc a:hover {
    text-decoration: underline;
}
/* Large List Styling */
.large-list {
    font-size: 1.05rem;
    line-height: 1.8;
}

.large-list li {
    margin-bottom: 12px;
}

/* Table Styling */
.table-bordered td, .table-bordered th {
    border-color: #e5e7eb;
}

.table th {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #1f2937;
}

.table td {
    padding: 12px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

/* Code Styling */
code {
    background-color: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    color: #d97706;
}

/* Link Styling for Sample Files */
.sample-file-link {
    color: #2563eb;
    font-weight: 500;
}

/* Call to Action Box */
.cta-box {
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 30px;
    margin-top: 50px;
    text-align: center;
}

.cta-box h3 {
    color: #0c4a6e;
    margin-bottom: 15px;
    margin-top: 0;
}

.cta-box p {
    color: #0c4a6e;
    margin-bottom: 20px;
}

/* No Margin List */
.no-margin-list {
    margin-bottom: 0 !important;
}