/* Modern CNN Custom Styles */

/* Two Column Layout - For side-by-side content */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
    margin: 20px 0;
}

.left-column {
    padding: 10px;
}

.right-column {
    padding: 10px;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Application Grid for Introduction */
.application-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.app-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.app-card .icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.app-card h5 {
    color: #10099F;
    margin: 10px 0;
    font-size: 0.9em;
}

.app-card p {
    margin: 5px 0;
    font-size: 0.85em;
    color: #666;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px auto;
    max-width: 600px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #10099F 0%, #2DD2C0 100%);
    color: white;
    border-radius: 10px;
}

.stat-card .number {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-card .label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Timeline Compact */
.timeline-compact {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #10099F;
}

.timeline-compact .entry {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.85em;
}

.timeline-compact .entry:last-child {
    border-bottom: none;
}

.timeline-compact .entry strong {
    color: #10099F;
}

/* Evolution Stages */
.evolution-stages {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    margin: 30px 0;
    gap: 20px;
}

.stage {
    flex: 1;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stage:hover {
    border-color: #10099F;
    box-shadow: 0 5px 15px rgba(16, 9, 159, 0.1);
}

.stage-header {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #10099F;
    border-bottom: 2px solid #2DD2C0;
    padding-bottom: 10px;
}

.stage ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.stage li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.stage li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #2DD2C0;
}

/* Architecture Timeline */
.architecture-timeline {
    text-align: center;
    padding: 20px;
}

.timeline-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.dot.alexnet { background: #FC8484; }
.dot.vgg { background: #FFA05F; }
.dot.nin { background: #FAC55B; }
.dot.googlenet { background: #2DD2C0; }
.dot.resnet { background: #10099F; }
.dot.densenet { background: #00FFBA; }

/* Innovation Cards */
.innovation-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin: 20px auto;
    max-width: 600px;
    transition: all 0.3s ease;
}

.innovation-card:hover {
    border-color: #10099F;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.innovation-card h4 {
    color: #10099F;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.innovation-details p {
    margin: 10px 0;
    line-height: 1.6;
}

.innovation-details strong {
    color: #10099F;
}

/* Approach Grid */
.approach-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.approach {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #10099F;
}

.approach h5 {
    color: #10099F;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.approach ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.approach li {
    padding: 5px 0;
    margin: 5px 0;
}

.approach li strong {
    color: #10099F;
}

.approach .highlight {
    background: #FAC55B;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
}

/* Insight Box */
.insight-box {
    background: linear-gradient(135deg, #f0f0ff 0%, #e0ffe0 100%);
    border: 2px solid #10099F;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.insight-box p {
    margin: 0;
    line-height: 1.6;
}

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

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

.comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

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

.comparison-table td strong {
    color: #10099F;
}

/* Results Box */
.results-box {
    background: #e8f4fd;
    border: 2px solid #2DD2C0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.results-box h5 {
    color: #10099F;
    margin-bottom: 10px;
}

.results-box p {
    margin: 5px 0;
    line-height: 1.6;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.topic-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.topic-card:hover {
    background: #f0f0ff;
    border-color: #10099F;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(16, 9, 159, 0.2);
}

.topic-card h5 {
    color: #10099F;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.topic-card p {
    font-size: 0.8em;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.insight-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.insight-card h5 {
    color: #10099F;
    margin-bottom: 15px;
    font-size: 1em;
}

.insight-card p {
    font-size: 0.85em;
    line-height: 1.5;
    color: #444;
}

/* AlexNet Specific Styles */

/* Achievement Grid */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.achievement-card {
    background: white;
    border: 2px solid #10099F;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.achievement-card .metric {
    font-size: 2em;
    font-weight: bold;
    color: #10099F;
    margin-bottom: 10px;
}

.achievement-card .label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.achievement-card .comparison {
    font-size: 0.8em;
    color: #999;
    font-style: italic;
}

/* Key People */
.key-people {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.key-people h5 {
    color: #10099F;
    margin-bottom: 15px;
}

.key-people p {
    margin: 8px 0;
}

/* Pipeline Comparison */
.pipeline-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.pipeline-old, .pipeline-new {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.pipeline-new {
    border-color: #10099F;
}

.pipeline-steps {
    margin-top: 15px;
}

.pipeline-steps .step {
    background: #f5f5f5;
    padding: 10px;
    margin: 8px 0;
    border-radius: 5px;
    text-align: center;
}

.pipeline-steps .step.highlight {
    background: #10099F;
    color: white;
}

.pipeline-steps .arrow {
    text-align: center;
    color: #10099F;
    font-size: 1.2em;
    margin: 5px 0;
}

/* Layer Grid */
.layer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.layer-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #10099F;
}

.layer-info strong {
    color: #10099F;
}

.layer-info em {
    color: #666;
    font-size: 0.9em;
}

/* Window Sizes */
.window-sizes {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.size-card {
    background: white;
    border: 2px solid #10099F;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    flex: 1;
    margin: 0 10px;
}

.size-card .size {
    font-size: 1.5em;
    font-weight: bold;
    color: #10099F;
    margin-bottom: 10px;
}

.size-card .reason {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

.size-card .math {
    font-size: 0.8em;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

/* Advantage Grid */
.advantage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.advantage-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.advantage-card h6 {
    color: #10099F;
    margin-bottom: 10px;
}

/* Dataset Timeline */
.dataset-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    position: relative;
}

.dataset-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    flex: 1;
    margin: 0 5px;
}

.dataset-card.highlight {
    border-color: #10099F;
    background: #f0f0ff;
}

.dataset-card h6 {
    color: #10099F;
    margin-bottom: 10px;
}

.dataset-card .stats {
    font-size: 0.8em;
}

.dataset-card .stats div {
    margin: 5px 0;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.detail-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.detail-card h6 {
    color: #10099F;
    margin-bottom: 10px;
    font-size: 1em;
}

/* Hardware Timeline */
.timeline-cards {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.hw-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    flex: 1;
    margin: 0 5px;
}

.hw-card.highlight {
    border-color: #10099F;
    background: #f0f0ff;
}

.hw-card h6 {
    color: #10099F;
    margin-bottom: 10px;
}

.hw-card p {
    font-size: 0.85em;
    margin: 5px 0;
}

/* Advantage Comparison */
.advantage-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.cpu-col, .gpu-col {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.gpu-col {
    border-color: #10099F;
}

.cpu-col h6, .gpu-col h6 {
    color: #10099F;
    margin-bottom: 15px;
    text-align: center;
}

.cpu-col ul, .gpu-col ul {
    list-style: none;
    padding: 0;
}

.cpu-col li, .gpu-col li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.cpu-col li:before, .gpu-col li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #10099F;
}

/* Technique Grid */
.technique-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.technique-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.technique-card h6 {
    color: #10099F;
    margin-bottom: 10px;
}

/* Filter Types */
.filter-types {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.filter-type {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    margin: 0 10px;
}

.filter-type h6 {
    color: #10099F;
    margin-bottom: 10px;
}

/* Computation Bars */
.computation-bars {
    margin: 20px 0;
}

.comp-bar {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.comp-bar .label {
    width: 120px;
    font-weight: bold;
}

.comp-bar .bar {
    padding: 8px 15px;
    color: white;
    border-radius: 5px;
    font-weight: bold;
}

/* Tip Grid */
.tip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.tip-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.tip-card h6 {
    color: #10099F;
    margin-bottom: 10px;
}

/* Exercise Cards */
.exercise-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.exercise-card h5 {
    color: #10099F;
    margin-bottom: 10px;
}

.exercise-card details summary {
    cursor: pointer;
    color: #10099F;
    font-weight: bold;
}

.exercise-card details p {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

/* Use Case Grid */
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.use-case {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.use-case h6 {
    color: #10099F;
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* Memory Table Highlight */
.memory-table tr.highlight {
    background: #fff3cd;
}

.memory-table tr.highlight td {
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .application-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .evolution-stages {
        flex-direction: column;
    }

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

    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .comparison-table {
        font-size: 0.8em;
    }

    .comparison-table th, .comparison-table td {
        padding: 8px;
    }

    /* AlexNet Responsive */
    .achievement-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-comparison {
        grid-template-columns: 1fr;
    }

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

    .window-sizes {
        flex-direction: column;
    }

    .size-card {
        margin: 10px 0;
    }

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

    .dataset-timeline {
        flex-direction: column;
    }

    .dataset-card {
        margin: 10px 0;
    }

    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-cards {
        flex-direction: column;
    }

    .hw-card {
        margin: 10px 0;
    }

    .advantage-comparison {
        grid-template-columns: 1fr;
    }

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

    .filter-types {
        flex-direction: column;
    }

    .filter-type {
        margin: 10px 0;
    }

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

    .use-case-grid {
        grid-template-columns: 1fr;
    }
}