/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

p {
    margin: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    padding-top: 48px;
}

/* Navigation Bar */
.navbar {
    background: white;
    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: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand:hover {
    color: #3b82f6;
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover {
    color: #3b82f6;
}

.nav-link.active {
    color: #3b82f6;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 8px 16px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-link:hover {
    background: #f8fafc;
    color: #3b82f6;
}

.dropdown-chevron {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.nav-item:hover .dropdown-chevron {
    transform: rotate(180deg);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke: #0f172a;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 48px;
}

.tool-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #0f172a;
}

.tool-header p {
    font-size: 18px;
    color: #64748b;
    margin: 0;
}

/* Input Components */
.input-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 32px;
}

.label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #ffffff;
    font-family: inherit;
}

.input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #ffffff;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    resize: vertical;
    min-height: 200px;
}

.textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    color: white;
    background: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    color: #334155;
    background: #f1f5f9;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.copy-button {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: #2563eb;
}

.copy-button.success {
    background: #10b981;
}

/* Results Display */
.results-section {
    display: none;
}

.section-header {
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    margin: 32px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.result-item {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.2s ease;
}

.result-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.result-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.result-text {
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 4px;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
}

.result-item .copy-button {
    position: absolute;
    top: 16px;
    right: 16px;
}

/* Character Count */
.char-count {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 8px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 64px 0;
    color: #94a3b8;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    stroke: currentColor;
}

.empty-state p {
    font-size: 16px;
}

/* Footer */
.footer {
    margin-top: 64px;
    padding: 24px 0;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.footer-content {
    font-size: 14px;
    color: #94a3b8;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0a0a0a;
        color: #f0f0f0;
    }

    .navbar {
        background: #1a1a1a;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    }

    .nav-brand {
        color: #f0f0f0;
    }

    .nav-brand:hover {
        color: #60a5fa;
    }

    .nav-link {
        color: #a0a0a0;
    }

    .nav-link:hover {
        color: #60a5fa;
    }

    .nav-link.active {
        color: #60a5fa;
    }

    .nav-dropdown {
        background: #1a1a1a;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    }

    .dropdown-link {
        color: #a0a0a0;
    }

    .dropdown-link:hover {
        background: #2a2a2a;
        color: #60a5fa;
    }

    .menu-toggle svg {
        stroke: #f0f0f0;
    }

    .tool-header h1 {
        color: #f0f0f0;
    }

    .tool-header p {
        color: #a0a0a0;
    }

    .input-section {
        background: #1a1a1a;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    .label {
        color: #e0e0e0;
    }

    .input,
    .textarea {
        background: #2a2a2a;
        border-color: #404040;
        color: #f0f0f0;
    }

    .input:focus,
    .textarea:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }

    .btn-secondary {
        background: #2a2a2a;
        color: #f0f0f0;
    }

    .btn-secondary:hover {
        background: #404040;
    }

    .section-header {
        color: #e0e0e0;
        border-color: #404040;
    }

    .result-item {
        background: #1a1a1a;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    .result-text {
        background: #2a2a2a;
        color: #f0f0f0;
    }

    .result-label {
        color: #a0a0a0;
    }

    .char-count {
        color: #808080;
    }

    .empty-state {
        color: #707070;
    }

    .footer {
        border-color: #404040;
        color: #808080;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
        padding-top: 32px;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        padding: 12px 0;
    }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 0;
        padding-left: 16px;
        display: none;
    }

    .nav-item.expanded .nav-dropdown {
        display: block;
    }

    .menu-toggle {
        display: block;
    }

    .tool-header h1 {
        font-size: 28px;
    }

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

    @media (prefers-color-scheme: dark) {
        .nav-menu {
            background: #1a1a1a;
        }
    }
}

/* Albright Labs CTA Section */
.albright-cta {
    margin-top: 64px;
    margin-bottom: 32px;
    text-align: center;
    padding: 64px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
}

.albright-cta h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.albright-cta-subtitle {
    font-size: 18px;
    margin: 0 0 32px 0;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.albright-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    max-width: 800px;
    margin: 0 auto 32px;
}

.albright-stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.albright-stat-label {
    opacity: 0.9;
}

.albright-cta-question {
    font-size: 20px;
    margin: 0 0 32px 0;
    font-weight: 600;
}

.albright-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.albright-btn-primary {
    padding: 12px 32px;
    line-height: 1.75;
    background: white;
    color: #764ba2;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
}

.albright-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.albright-btn-secondary {
    padding: 12px 32px;
    background: transparent;
    color: white;
    text-decoration: none;
    border: 2px solid white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
}

.albright-btn-secondary:hover {
    background: white;
    color: #764ba2;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .albright-cta {
        background: linear-gradient(135deg, #4c51bf 0%, #5a319f 100%);
    }

    .albright-btn-primary {
        background: #f0f0f0;
        color: #5a319f;
    }

    .albright-btn-primary:hover {
        background: white;
    }
}

@media (max-width: 768px) {
    .albright-cta h2 {
        font-size: 28px;
    }

    .albright-cta {
        padding: 48px 16px;
    }
}

.footer-content {
    text-align: center;
}

.footer-main {
    margin-bottom: 8px;
}

.footer-links {
    font-size: 14px;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #3b82f6;
}

.footer-separator {
    margin: 0 8px;
    color: #cbd5e1;
}

@media (max-width: 640px) {
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .footer-separator {
        display: none;
    }
}

@media (prefers-color-scheme: dark) {
    .footer-links a {
        color: #808080;
    }

    .footer-links a:hover {
        color: #60a5fa;
    }

    .footer-separator {
        color: #404040;
    }
}

/* Logo styles */
.nav-logo {
    width: 32px;
    height: 32px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .nav-logo {
        /* Optional: Add filter for better visibility in dark mode */
        filter: brightness(1.1);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .nav-logo {
        width: 28px;
        height: 28px;
    }
}