/* Detail Pages CSS - Specific styles for Python and Common Test overview pages */

/* Detail Container */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    min-height: calc(100vh - 120px);
}

/* Detail Sections */
.detail-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.detail-section h2 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 24px;
}

.detail-section h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 20px;
}

.detail-section h4 {
    color: #555;
    margin-bottom: 10px;
    font-size: 16px;
}

/* Content Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.text-content {
    line-height: 1.6;
}

.text-content p {
    margin-bottom: 15px;
    color: #444;
}

.text-content ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.text-content li {
    margin-bottom: 8px;
    color: #555;
}

.text-content strong {
    color: #2c3e50;
}

/* Code Examples */
.code-example {
    background: #2d3748;
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

.code-example h4 {
    color: #63b3ed;
    margin-bottom: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.code-example pre {
    margin: 0;
    overflow-x: auto;
}

.code-example code {
    color: #e2e8f0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.5;
}

/* Syntax Categories */
.syntax-category {
    margin-bottom: 35px;
}

.syntax-category h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    font-size: 18px;
}

.syntax-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 0;
}

.syntax-item {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 0 0 8px 8px;
    padding: 20px;
}

.syntax-item h4 {
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.syntax-item pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.feature-item {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
}

.feature-item p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.feature-item pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.3;
    margin: 0;
}

/* Comparison Tables */
.comparison-tables {
    display: grid;
    gap: 30px;
    margin-top: 20px;
}

.comparison-table {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
}

.comparison-table h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comparison-table th {
    background: #34495e;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e1e8ed;
    vertical-align: top;
}

.comparison-table td code {
    background: #f1f3f4;
    color: #d63384;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
}

.comparison-table tr:nth-child(even) td {
    background: #f8f9fa;
}

.comparison-table tr:hover td {
    background: #e3f2fd;
}

/* Algorithm Examples */
.algorithm-examples {
    display: grid;
    gap: 25px;
    margin-top: 20px;
}

.algorithm-item {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 25px;
}

.algorithm-item h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
}

.algorithm-item pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

/* Applications Grid */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.application-item {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
}

.application-item h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 18px;
}

.application-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.application-item li {
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

/* Learning Points */
.learning-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.point-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 25px;
}

.point-item h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 16px;
}

.point-item p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    line-height: 1.5;
}

.point-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.point-item li {
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.point-item strong {
    color: #ffd700;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.resource-category {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
}

.resource-category h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
}

.resource-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-category li {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.resource-category a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.resource-category a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.resource-category strong {
    color: #2c3e50;
}

/* Header Navigation */
.header-nav {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Detail Footer */
.detail-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer-content p {
    margin: 5px 0;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .syntax-examples {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .applications-grid,
    .learning-points,
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-container {
        padding: 15px;
    }
    
    .detail-section {
        padding: 20px;
    }
    
    .comparison-table {
        padding: 15px;
    }
    
    .algorithm-item {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .detail-section h2 {
        font-size: 20px;
    }
    
    .detail-section h3 {
        font-size: 18px;
    }
    
    .code-example,
    .syntax-item pre,
    .feature-item pre,
    .algorithm-item pre {
        font-size: 12px;
        padding: 12px;
    }
    
    .header-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-link {
        width: 200px;
        justify-content: center;
    }
}