/* css/style.css */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --ad-bg: #f1f5f9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Header & Nav */
header {
    background-color: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

/* Ads Placeholder */
.ad-space {
    background-color: var(--ad-bg);
    border: 1px dashed #cbd5e1;
    text-align: center;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
}
.ad-top { height: 90px; width: 100%; max-width: 1200px; margin: 1rem auto; }
.ad-sidebar { height: 250px; width: 100%; margin-bottom: 2rem; }
.ad-sidebar-large { height: 600px; width: 100%; margin-bottom: 2rem; position: sticky; top: 5rem;}
.ad-content { height: 100px; width: 100%; margin: 2rem 0; }
.ad-bottom { height: 90px; width: 100%; max-width: 1200px; margin: 2rem auto; }

/* Main Content Area */
.main-content {
    background: transparent;
}

.header-box {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    text-align: center;
}

.subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

/* Controls */
.controls-section {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

select {
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    min-width: 150px;
    flex: 1;
}

select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    background-color: var(--primary-color);
    color: white;
    flex: 1;
    min-width: 200px;
}

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

.btn:active {
    transform: translateY(1px);
}

/* Result Cards */
#results-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.result-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    color: var(--primary-color);
    margin: 0;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.data-group {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.data-group-header {
    background: #f1f5f9;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #334155;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-row {
    display: flex;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    width: 140px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.data-value {
    flex-grow: 1;
    color: var(--text-main);
    font-weight: 500;
    word-break: break-all;
}

.btn-copy {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 1rem;
    flex-shrink: 0;
}

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

/* Static Pages Content */
.page-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.page-content h1 { text-align: left; margin-bottom: 1.5rem; }
.page-content h2 { margin: 1.5rem 0 1rem; color: var(--text-main); font-size: 1.4rem;}
.page-content p { margin-bottom: 1rem; color: #475569; }
.page-content ul { margin-bottom: 1rem; padding-left: 1.5rem; color: #475569; }
.page-content li { margin-bottom: 0.5rem; }

/* Footer */
footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: 2rem;
}
.footer-links {
    margin-bottom: 1rem;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 0.5rem;
}
.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }
    .ad-sidebar-large {
        position: static;
        height: auto;
        min-height: 250px;
    }
}

@media (max-width: 600px) {
    .nav-container { flex-direction: column; gap: 1rem; }
    nav ul { flex-wrap: wrap; justify-content: center; }
    .data-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .data-label { width: 100%; font-size: 0.9rem; }
    .btn-copy { margin-left: 0; margin-top: 0.5rem; }
    .controls-section { flex-direction: column; align-items: stretch; }
    select, .btn { width: 100%; }
}