/* Documentation Stylesheet for Jukebox JavaFX Tutorial */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header and Navigation */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.nav {
    background-color: #2c3e50;
    padding: 0.5rem 1rem;
    overflow-x: auto;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav li {
    flex-shrink: 0;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: block;
    font-size: 0.9rem;
}

.nav a:hover {
    background-color: #34495e;
}

.nav a.active {
    background-color: #667eea;
    font-weight: bold;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Cookbook Grid on Index */
.cookbook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.cookbook-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.cookbook-card h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.cookbook-card .meta {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.75rem;
    border-top: 1px solid #eee;
    padding-top: 0.75rem;
}

/* Content Layout */
.content-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
    font-size: 1.8rem;
}

.content-section h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.3rem;
}

.content-section h4 {
    color: #667eea;
    margin: 1.25rem 0 0.75rem 0;
    font-size: 1.1rem;
}

/* Code Blocks */
pre {
    background: #282c34;
    color: #abb2bf;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

pre code {
    background: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

.code-block {
    position: relative;
}

.code-block pre {
    counter-reset: line;
    padding-left: 3rem;
}

.code-block pre code {
    counter-reset: line;
}

.code-block pre code > span {
    display: block;
    position: relative;
    padding-left: 1rem;
}

.code-block pre code > span:before {
    counter-increment: line;
    content: counter(line);
    position: absolute;
    left: -3rem;
    color: #636d83;
    text-align: right;
    width: 2.5rem;
    padding-right: 0.5rem;
}

/* Java Syntax Highlighting */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #5c6370;
}

.token.punctuation {
    color: #abb2bf;
}

.token.keyword {
    color: #c678dd;
    font-weight: bold;
}

.token.operator,
.token.tag {
    color: #d19a66;
}

.token.class-name,
.token.boolean,
.token.number {
    color: #d19a66;
}

.token.string {
    color: #98c379;
}

.token.function {
    color: #61afef;
}

.token.variable,
.token.property {
    color: #abb2bf;
}

.token.constant {
    color: #e5c07b;
}

/* Inline Code */
code {
    background: #f0f0f0;
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

table th {
    background: #667eea;
    color: white;
    padding: 0.75rem;
    text-align: left;
}

table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

table tr:hover {
    background: #f8f9fa;
}

/* Info Boxes */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.info-box .icon {
    color: #2196f3;
    margin-right: 0.5rem;
}

.warning-box {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.warning-box .icon {
    color: #ff9800;
    margin-right: 0.5rem;
}

.success-box {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.success-box .icon {
    color: #4caf50;
    margin-right: 0.5rem;
}

/* Lists */
ul, ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

ul {
    list-style: disc;
}

ol {
    list-style: decimal;
}

li {
    margin: 0.5rem 0;
}

/* Paragraphs */
p {
    margin: 1rem 0;
}

/* Blockquotes */
blockquote {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-style: italic;
}

/* Links */
a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #764ba2;
}

/* File Reference */
.file-ref {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Consolas', monospace;
    font-size: 0.85em;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .cookbook-grid {
        grid-template-columns: 1fr;
    }
    
    .nav ul {
        gap: 0.25rem;
    }
    
    .nav a {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .nav, .header {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .content-section, .cookbook-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

.footer a {
    color: #abb2bf;
}

.footer a:hover {
    color: white;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #667eea;
}

.breadcrumb span {
    color: #666;
    margin: 0 0.5rem;
}

/* Step List */
.steps {
    counter-reset: step;
}

.steps > li {
    counter-increment: step;
    position: relative;
    padding-left: 2.5rem;
    margin: 1rem 0;
    list-style: none;
}

.steps > li:before {
    content: counter(step);
    position: absolute;
    left: 0;
    width: 2rem;
    height: 2rem;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Try It Section */
.try-it {
    background: #fff8e1;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border-left: 4px solid #ffc107;
}

.try-it h4 {
    color: #8d6e63;
    margin-bottom: 0.5rem;
}

/* Related Links */
.related-links {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.related-links h4 {
    color: #34495e;
    margin-bottom: 0.75rem;
}

.related-links ul {
    padding-left: 1rem;
}

.related-links li {
    margin: 0.25rem 0;
}
