/* Crypto Keys Page Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

h2 {
    color: #2c3e50;
    margin-top: 30px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

h3 {
    color: #3498db;
    margin-top: 20px;
}

.crypto-section {
    margin-bottom: 40px;
}

.algorithm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.algorithm-table th, .algorithm-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.algorithm-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.algorithm-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.algorithm-table tr:hover {
    background-color: #f1f1f1;
}

/* Comparison Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.comparison-table th, .comparison-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.comparison-table th {
    background-color: #3498db;
    color: white;
    font-weight: bold;
}

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

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

.comparison-table td:first-child {
    background-color: #f2f2f2;
    font-weight: 500;
}

/* Multi-column layout styles */
.multi-column-list {
    column-count: 2;
    column-gap: 30px;
    margin: 15px 0;
}

.multi-column-list-3 {
    column-count: 3;
    column-gap: 30px;
    margin: 15px 0;
}

/* Prevent awkward breaks in list items */
.multi-column-list li,
.multi-column-list-3 li {
    break-inside: avoid-column;
    margin-bottom: 10px;
}

/* Two-column content layout */
.two-column-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px 0;
}

.column {
    flex: 1 1 45%;
    min-width: 250px;
}

/* Improved nested list styling */
ul ul, ol ol, ul ol, ol ul {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Enhanced table column balance */
.comparison-table th, .comparison-table td {
    width: 33.33%;
}

.comparison-table th:first-child {
    width: 25%;
}

/* Responsive adjustments for small screens */
@media screen and (max-width: 768px) {
    .comparison-table th, .comparison-table td {
        padding: 8px;
        font-size: 0.9em;
    }
    
    .multi-column-list,
    .multi-column-list-3 {
        column-count: 1;
    }
}

code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f8f8f8;
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid #e1e1e1;
    font-size: 0.9em;
}

.example {
    background-color: #f8f8f8;
    padding: 15px;
    border-left: 4px solid #3498db;
    margin: 15px 0;
}

.note {
    background-color: #fff8dc;
    padding: 15px;
    border-left: 4px solid #f0ad4e;
    margin: 15px 0;
}

.navigation-links {
    background-color: #f0f7fc;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.navigation-links a {
    text-decoration: none;
    color: #3498db;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
    margin-right: 10px;
}

.navigation-links a:hover {
    background-color: #e1e1e1;
}

.category-description {
    background-color: #f8f8f8;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.tool-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.tool-item {
    flex: 1 1 300px;
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tool-item h4 {
    color: #3498db;
    margin-top: 0;
}

#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

#back-to-top:hover {
    opacity: 1;
}

/* Specific styles for crypto content */
.key-comparison {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.key-type {
    flex: 1 1 300px;
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.key-type h4 {
    color: #3498db;
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .algorithm-table th, .algorithm-table td {
        padding: 8px;
    }
    
    .tool-list {
        flex-direction: column;
    }
    
    .key-comparison {
        flex-direction: column;
    }
    
    .two-column-content {
        flex-direction: column;
    }
    
    .column {
        width: 100%;
        margin-bottom: 20px;
    }
}