/* Write-up Layout */
.writeup {
    padding-top: 6rem;
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.7;
}

.writeup-header {
    margin-bottom: 4rem;
    text-align: center;
}

.writeup-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.writeup-meta {
    margin-bottom: 2rem;
}

.writeup-header .lead {
    font-size: 1.4rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
    font-weight: 400;
}

.breadcrumb {
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* Article Header */
.writeup-content header {
    margin-bottom: 3rem;
}

.writeup-content h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

/* Overview Section */
.overview {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.quick-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 2rem;
    background: var(--background-dark);
    border-radius: 16px;
    border: 1px solid var(--border);
}

/* Code Blocks */
.code-block {
    margin: 2.5rem 0;
    background: var(--background-dark);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.copy-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.copy-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--background-dark);
}

pre {
    margin: 0;
    padding: 2rem;
    overflow-x: auto;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    background: transparent;
}

code {
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background: var(--background-dark);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    color: var(--primary);
    border: 1px solid var(--border);
}

/* Tables */
.results-table {
    margin: 2.5rem 0;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-light);
}

th, td {
    padding: 1.25rem;
    text-align: left;
    border: 1px solid var(--border);
}

th {
    background: var(--background-dark);
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

td {
    color: var(--text-light);
}

tr:hover {
    background: var(--background-dark);
}

/* Sections */
section {
    margin: 5rem 0;
}

section:first-child {
    margin-top: 0;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary);
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

h3 {
    font-size: 1.75rem;
    margin: 3rem 0 1.5rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1.25rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.4;
}

h5 {
    font-size: 1.2rem;
    margin: 2rem 0 1rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.4;
}

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

li {
    margin: 0.75rem 0;
    color: var(--text-light);
    line-height: 1.7;
}

li strong {
    color: var(--text);
}

/* Alerts */
.alert {
    padding: 2rem;
    margin: 2.5rem 0;
    border-radius: 16px;
    border-left: 5px solid var(--primary);
    background: var(--background-dark);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.alert.info {
    border-left-color: var(--info);
    background: rgba(0, 128, 255, 0.08);
}

.alert.warning {
    border-left-color: var(--warning);
    background: rgba(255, 170, 0, 0.08);
}

.alert.error {
    border-left-color: var(--error);
    background: rgba(255, 0, 64, 0.08);
}

.alert.success {
    border-left-color: var(--success);
    background: rgba(0, 255, 65, 0.08);
}

/* File Content */
.file-content {
    margin: 2.5rem 0;
}

.file-content h4 {
    margin-bottom: 1.25rem;
    color: var(--text);
    font-weight: 600;
}

/* Flags Section */
.flags {
    margin-top: 5rem;
}

.flag-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.flag {
    padding: 2rem;
    background: var(--background-dark);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.flag:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.flag code {
    display: block;
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: var(--background);
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
    color: var(--primary);
    border: 1px solid var(--border);
    word-break: break-all;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--background-dark);
    border-radius: 30px;
    border: 1px solid var(--primary);
    margin-right: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary);
    color: var(--background);
    transform: translateY(-2px);
}

/* Paragraphs and Text */
p {
    margin-bottom: 1.75rem;
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
    max-width: 100%;
}

strong {
    color: var(--text);
    font-weight: 600;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .writeup {
        padding-top: 5rem;
        max-width: 100%;
    }

    .writeup-header h1 {
        font-size: 2.5rem;
    }

    .writeup-content h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .quick-info {
        grid-template-columns: 1fr;
    }

    pre {
        font-size: 0.85rem;
        padding: 1rem;
    }

    .code-header {
        padding: 0.75rem 1rem;
    }

    th, td {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .code-block {
    background: var(--background-dark);
}

[data-theme="dark"] .copy-btn {
    color: var(--text-light);
    border-color: var(--border);
}

[data-theme="dark"] .copy-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Print Styles */
@media print {
    .writeup {
        padding-top: 0;
    }

    pre {
        white-space: pre-wrap;
        border: 1px solid var(--border);
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
    }
}

/* Animations */
.writeup {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 