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

input,
button,
select,
textarea {
    font-family: inherit;
}

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

body {
    font-family: 'Microsoft Tai Le', 'Rajdhani', 'Segoe UI', sans-serif;
    background: #f5f5f5;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 0;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: visible;
    position: relative;
    z-index: 1;
}

.container.wide-layout {
    max-width: none;
    width: fit-content;
    min-width: 100%;
}

header {
    background: #1a1a1a;
    color: #ffffff;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    border-bottom: 2px solid #333333;
}

header h1 {
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.2em;
    color: #cccccc;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 2px;
    background: #1a1a1a;
    transition: left 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.tabs.tab-2::after {
    left: 50%;
}

.tab-button {
    flex: 1;
    padding: 18px 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    color: #666666;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 100;
    pointer-events: auto;
    user-select: none;
}

.tab-button:hover {
    color: #1a1a1a;
    background: #f0f0f0;
}

.tab-button.active {
    color: #1a1a1a;
    border-bottom-color: transparent;
    background: #ffffff;
}

.tab-content {
    display: none;
    padding: 40px;
    min-height: 600px;
    background: #ffffff;
    position: relative;
}

.tab-content.active {
    display: block;
}

/* Home Tab Styles */
.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.content-wrapper>h2 {
    color: #1a1a1a;
    font-size: 2.2em;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
}

.content-wrapper.wide-title {
    max-width: 1200px;
}

.intro-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 0;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #1a1a1a;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.intro-section:hover {
    border-color: #cccccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(3px);
}

.intro-section h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 1.6em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.intro-section p {
    line-height: 1.9;
    color: #333333;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 400;
}

.intro-section ul {
    margin-left: 25px;
    line-height: 2.2;
}

.intro-section li {
    margin-bottom: 12px;
    color: #333333;
    font-size: 1.05em;
}

.intro-section li strong {
    color: #1a1a1a;
    font-weight: 600;
}

.formula {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 0;
    text-align: center;
    font-size: 1.2em;
    margin: 25px 0;
    border: 1px solid #e0e0e0;
    /* font-family: 'Courier New', monospace; - Keeping this as it is code/formula */
    color: #1a1a1a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* VF Calc Tab Styles moved to tools/view-factor/style.css */

/* Fire Severity Tab Styles moved to tools/fire-severity/style.css */

/* Auth Specific Styles */
.auth-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 100px 20px 40px;
    /* Top padding for fixed nav, bottom for footer spacing */
    background: #f5f5f5;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}

.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border: 1px solid #e0e0e0;
    border-top: 4px solid #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    /* Align with app's sharp edges */
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #1a1a1a;
    font-size: 2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    font-size: 1.1em;
    font-weight: 500;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-size: 0.9em;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 1.1em;
    background: #f9f9f9;
    color: #333;
    transition: all 0.3s;
    box-sizing: border-box;
}

.auth-form input:focus,
.auth-form select:focus {
    border-color: #1a1a1a;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    border-radius: 0;
}

.auth-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-footer a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-footer a:hover {
    color: #666;
    text-decoration: underline;
}

/* Dashboard and Footer Styles */
.hero-section h2 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 20px;
}

.dashboard-section {
    background: white;
    padding: 30px;
    border-radius: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.dashboard-section h3 {
    color: #1a1a1a;
    margin-bottom: 20px;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 10px;
    display: inline-block;
}

footer {
    background: #f8f9fa;
    width: 100%;
    margin-top: 50px;
    border-top: 1px solid #ddd;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.footer-content a {
    color: #1a1a1a;
    text-decoration: none;
}

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

#visitor-cta .btn-primary {
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

#visitor-cta .btn-secondary {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#visitor-cta .btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
}

#visitor-cta .btn-secondary:hover {
    background: #f0f0f0;
}

/* Tools Grid Styles */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.tool-button {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    min-height: 220px;
    /* Increased slightly for badges */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.tool-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #1a1a1a;
}

.tool-icon {
    font-size: 3.5em;
    margin-bottom: 25px;
    display: block;
}

.tool-name {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1.3em;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tool-desc {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    flex-grow: 1;
    /* Pushes footer down */
}

/* Tool Badges */
.tool-footer-badges {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.tool-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-free {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-member {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.status-wip {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

.status-coming {
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
}

.lock-icon {
    font-size: 0.9em;
}

/* Preview Mode Banner */
.preview-mode-banner {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    color: #e65100;
    padding: 15px 25px;
    margin-bottom: 30px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    border-left: 5px solid #ff9800;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .dashboard-section {
        padding: 20px;
    }

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

    /* Force single column on very small screens if needed, otherwise auto-fit handles it */

    .container {
        border-left: none;
        border-right: none;
        width: 100%;
    }
}

.preview-mode-banner .banner-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-mode-banner .banner-icon {
    font-size: 1.4rem;
}

.preview-mode-banner .btn-banner-login {
    background: #ff9800;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.preview-mode-banner .btn-banner-login:hover {
    background: #f57c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}