/* Premium Blueprint Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #0f172a;
    --bg-surface: rgba(30, 41, 59, 0.7);
    --bg-surface-hover: rgba(30, 41, 59, 0.9);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-glow: rgba(6, 182, 212, 0.15);
    --accent-primary: #0ea5e9;
    --accent-hover: #0284c7;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-highlight: rgba(14, 165, 233, 0.5);
    --font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-main);
    background-attachment: fixed;
    font-family: var(--font-family);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.main-container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 40px 40px 40px;
}

/* Header */
.site-header {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5em 0;
    margin-bottom: 4em;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-logo {
    font-size: 2.2rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.3s ease;
}

.brand-logo:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 6em 2em;
    margin-bottom: 4em;
    background: linear-gradient(180deg, rgba(30,41,59,0) 0%, rgba(30,41,59,0.5) 100%);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), inset 0 0 40px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(var(--border-color) 1px, transparent 1px),
                      linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin: 0 0 0.2em 0;
    background: linear-gradient(to right, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Layout Grid */
.layout-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 40px;
}

.main-content-col {
    flex: 1;
    min-width: 0;
}

.layout-spacer {
    width: 250px;
    flex-shrink: 0;
}

/* Paper Grid */
.paper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.paper-card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.paper-card::before {
    content: "";
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(14,165,233,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.paper-card:hover {
    background: var(--bg-surface-hover);
    transform: translateY(-8px);
    border-color: var(--border-highlight);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 20px var(--accent-glow);
}

.paper-card:hover::before {
    opacity: 1;
}

.paper-card-header {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.paper-thumb {
    width: 150px;
    height: 190px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.paper-card:hover .paper-thumb {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.paper-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.paper-title {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.paper-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.paper-desc {
    margin: 0 0 24px 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

.paper-action {
    display: inline-flex;
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
    margin-top: auto;
}

.paper-action::after {
    content: "→";
    transition: transform 0.3s;
}

.paper-card:hover .paper-action {
    color: #38bdf8;
}

.paper-card:hover .paper-action::after {
    transform: translateX(6px);
}

/* Details Page UI */
.details-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 50px;
    display: flex;
    gap: 50px;
    margin-bottom: 3em;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.details-thumb-col {
    flex-shrink: 0;
}

.details-thumb-large {
    width: 260px;
    height: 330px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    background: #fff;
    object-fit: cover;
}

.details-content {
    flex: 1;
}

.details-content h2 {
    margin-top: 0;
    font-size: 2.8rem;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.details-content p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    color: #fff;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.5);
}

.btn-default {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-default:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* Chips */
.option-section {
    margin-top: 30px;
}

.option-section h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.option-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.chip:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: rgba(14, 165, 233, 0.1);
}

.chip.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
}

.switch-orientation {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 20px;
    font-size: 1.05rem;
}

.switch-orientation:hover {
    text-decoration: underline;
}

/* Tables */
.table-container {
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.table th {
    background: rgba(255,255,255,0.03);
    font-weight: 600;
    color: var(--text-primary);
}

.table td {
    color: var(--text-secondary);
    line-height: 1.6;
}

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

/* Footer */
.footer {
    text-align: center;
    margin-top: 5em;
    padding-top: 2.5em;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer a {
    color: var(--accent-primary);
    text-decoration: none;
    margin-left: 15px;
}

.footer a:hover {
    text-decoration: underline;
}

/* Virtual Workspace */
.virtual-workspace {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.virtual-controls-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 700px;
    margin-bottom: 30px;
    align-items: center;
}

#paper {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.05), 0 20px 50px rgba(0,0,0,0.6);
    background: #fff;
    cursor: crosshair;
}

#current_coordinates_container {
    width: 100%;
    max-width: 700px;
    margin-top: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1250px) {
    .layout-spacer {
        display: none;
    }
}

@media (max-width: 900px) {
    .main-container {
        padding: 0 15px 30px 15px;
    }
    .layout-row {
        gap: 20px;
    }
    .details-panel {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px;
    }
    .action-buttons {
        justify-content: center;
    }
    .option-chips {
        justify-content: center;
    }
    .hero-title {
        font-size: 2.4rem;
    }
    .paper-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Long-form Content Article (SEO copy: intro, features, FAQ, etc.)
   ========================================================================== */

.content-article {
    margin-top: 4em;
    padding-top: 3em;
    border-top: 1px solid var(--border-color);
}

.content-section {
    margin-bottom: 3em;
}

.content-section h2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 0.7em 0;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.content-section p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
    margin: 0 0 1em 0;
}

.content-section p:last-child {
    margin-bottom: 0;
}

/* Bullet + numbered lists */
.content-list,
.content-steps {
    margin: 0 0 1.2em 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.content-list li,
.content-steps li {
    position: relative;
    padding: 12px 18px 12px 44px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

.content-list li::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-glow);
}

.content-steps {
    counter-reset: pg-step;
}

.content-steps li::before {
    counter-increment: pg-step;
    content: counter(pg-step);
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Feature grid (Key Features sections) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 1.2em;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.feature-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-2px);
}

.feature-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.02rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* FAQ accordion */
.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px 20px;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 30px 16px 0;
    font-weight: 600;
    font-size: 1.03rem;
    color: var(--text-primary);
    position: relative;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 14px;
    font-size: 1.4rem;
    color: var(--accent-primary);
    transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding-bottom: 18px;
}

.faq-answer p,
.faq-answer li {
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}
