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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 68px 1fr auto;
    grid-template-areas: 
        "header header"
        "sidebar content"
        "footer footer";
    background: white;
}

.container.home {
    grid-template-columns: 1fr;
    grid-template-rows: 68px 1fr auto;
    grid-template-areas:
        "header"
        "content"
        "footer";
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: 68px 1fr auto;
        grid-template-areas: 
            "header"
            "content"
            "footer";
    }

    .tabs {
        position: relative;
        height: auto;
        width: auto;
        top: auto;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0;
    }
}

header {
    grid-area: header;
    background: #1d1d1f;
    color: white;
    padding: 12px 15px 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2em;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

header h2 {
    display: none;
}

.header-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: nowrap;
}

/* Sidebar Navigation */
.tabs {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    background: #1d1d1f;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    position: fixed;
    left: 0;
    top: 68px;
    height: calc(100vh - 68px - 50px);
    width: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    z-index: 99;
}

.tabs::-webkit-scrollbar {
    width: 6px;
}

.tabs::-webkit-scrollbar-track {
    background: transparent;
}

.tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.tabs::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1024px) {
    .tabs {
        position: relative;
        height: auto;
        width: auto;
        top: auto;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0;
    }
}

.search-container {
    position: relative;
    flex: 0 1 400px;
    min-width: 250px;
}

.search-container input {
    width: 100%;
    padding: 14px 48px 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-container input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1em;
    pointer-events: none;
}

.unit-selector {
    position: relative;
}

.unit-button {
    padding: 9px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.unit-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.unit-indicator {
    background: rgba(0, 113, 227, 0.8);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
}

.unit-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    display: none;
    z-index: 1000;
}

.unit-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.unit-menu h4 {
    color: #1d1d1f;
    font-size: 1.2em;
    margin-bottom: 20px;
    font-weight: 600;
}

.unit-option {
    margin-bottom: 16px;
}

.unit-option label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #1d1d1f;
}

.unit-option strong {
    font-size: 0.95em;
    color: #6e6e73;
}

.unit-option select {
    padding: 10px 14px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 1em;
    background: #fbfbfd;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unit-option select:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.reset-units {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    border: none;
    border-radius: 8px;
    background: #f5f5f7;
    color: #1d1d1f;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-units:hover {
    background: #e8e8ed;
}

.pdf-export-button {
    padding: 11.75px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-export-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pdf-export-button:active {
    transform: translateY(0);
}

.pdf-icon {
    font-size: 1.2em;
}

.search-results {
    display: none;
    grid-area: search;
    background: #fbfbfd;
    border-bottom: 1px solid #d2d2d7;
    padding: 24px 60px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 90;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 0;
    /*margin-left: 280px;*/
    position: absolute;
    top: 68px;
    width: calc(100% - 280px);
}

@media (max-width: 1024px) {
    .search-results {
        padding: 16px 24px;
        margin-left: 0;
        width: 100%;
    }
    
    .tab-content {
        margin-left: 0;
    }
}

.search-results.show {
    display: block;
}

.search-results h4 {
    color: #1d1d1f;
    font-size: 1.1em;
    margin-bottom: 16px;
    font-weight: 600;
}

.search-result-item {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 1px solid #d2d2d7;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: #0071e3;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.1);
}

.search-result-item h5 {
    color: #0071e3;
    font-size: 1.05em;
    margin-bottom: 6px;
    font-weight: 600;
}

.search-result-item p {
    color: #6e6e73;
    font-size: 0.95em;
    margin: 4px 0;
}

.search-result-item .formula-preview {
    font-family: 'SF Mono', Monaco, monospace;
    color: #1d1d1f;
    background: #f5f5f7;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 0.9em;
}

.no-results {
    color: #6e6e73;
    text-align: center;
    padding: 32px;
    font-size: 1em;
}

.tab-button {
    flex: none;
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    font-size: 0.95em;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .tab-button {
        width: auto;
        min-width: 140px;
        padding: 18px 24px;
        border-left: none;
        border-bottom: 2px solid transparent;
        text-align: center;
    }
}

.tab-button:hover {
    color: #a1a1a6;
    background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
    color: #0071e3;
    background: rgba(0, 113, 227, 0.2);
    border-left-color: #0071e3;
}

@media (max-width: 1024px) {
    .tab-button.active {
        border-left-color: transparent;
        border-bottom-color: #0071e3;
    }
}

.tab-button.active::after {
    display: none;
}

/* Main Content Area */
.tab-content {
    display: none;
    grid-area: content;
    padding: 48px 60px;
    max-width: 1400px;
    background: #f5f5f7;
    color: #1d1d1f;
    margin-top: 0;
    /*margin-left: 280px;*/
    overflow-y: auto;
    height: calc(100vh - 68px - 50px);
}

.tab-content h3 {
    color: #1d1d1f;
    font-size: 2.5em;
    margin-bottom: 32px;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .tab-content {
        padding: 32px 24px;
        margin-left: 0;
        height: calc(100vh - 68px - 50px);
    }
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.tab-content h3 {
    font-size: 2.5em;
    color: #1d1d1f;
    /* margin-bottom: 40px; */
    padding-bottom: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.formula-section {
    margin-bottom: 48px;
}

.formula-section h4 {
    font-size: 1.75em;
    color: #1d1d1f;
    margin-bottom: 24px;
    margin-top: 32px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.formula-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 20px;
    border: 1px solid #e8e8ed;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.formula-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #0071e3;
    background: #fbfbfd;
}

.formula-card h5 {
    font-size: 1.4em;
    color: #1d1d1f;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.formula {
    font-size: 1.3em;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 12px 0;
    border-left: 3px solid #0071e3;
    color: #1d1d1f;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.description {
    color: #6e6e73;
    font-size: 1em;
    margin: 10px 0;
    line-height: 1.5;
}

.unit {
    color: #86868b;
    font-size: 0.95em;
    margin: 8px 0;
    font-family: 'SF Mono', monospace;
}

.info {
    color: #0071e3;
    font-size: 0.95em;
    margin: 8px 0;
    background: rgba(0, 113, 227, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
}

.formula-card ul {
    margin-left: 24px;
    margin-top: 12px;
}

.formula-card ul li {
    margin: 10px 0;
    color: #1d1d1f;
    line-height: 1.6;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin-top: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.graph-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
}

.graph-controls label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.95em;
    color: #1d1d1f;
    font-weight: 500;
}

.graph-controls input {
    padding: 10px 14px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 1em;
    background: #fbfbfd;
    transition: all 0.2s ease;
}

/* Collapsible Graph Section */
.graph-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-top: 16px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.graph-toggle:hover {
    background: #0051d5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.graph-toggle:active {
    transform: translateY(0);
}

.graph-toggle-icon {
    transition: transform 0.3s ease;
    font-size: 1.2em;
}

.graph-toggle.active .graph-toggle-icon {
    transform: rotate(180deg);
}

.graph-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.graph-content.active {
    max-height: 800px;
    padding-top: 16px;
}

.inline-chart-container {
    position: relative;
    width: 100%;
    height: 350px;
    margin-top: 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #d2d2d7;
}

.graph-controls input:focus {
    outline: none;
    border-color: #0071e3;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.calculator {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid #d2d2d7;
}

.calculator input,
.calculator select {
    width: 100%;
    padding: 14px 16px;
    margin: 8px 0;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 1em;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: #fbfbfd;
    transition: all 0.2s ease;
}

.calculator input:focus,
.calculator select:focus {
    outline: none;
    border-color: #0071e3;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.calculator button {
    width: 100%;
    padding: 14px 24px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05em;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.calculator button:hover {
    background: #0077ed;
    transform: scale(1.01);
}

.calculator button:active {
    transform: scale(0.99);
    background: #0062cc;
}

.result {
    margin-top: 16px;
    padding: 16px 20px;
    background: #d1f2eb;
    border-radius: 10px;
    font-weight: 500;
    color: #00694f;
    display: none;
    border-left: 3px solid #00c896;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.result.show {
    display: block;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.comparison-table {
    overflow-x: auto;
    margin: 24px 0;
    -webkit-overflow-scrolling: touch;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d2d2d7;
}

.comparison-table th {
    background: #1d1d1f;
    color: white;
    padding: 18px 24px;
    text-align: left;
    font-size: 1.05em;
    font-weight: 600;
}

.comparison-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e7;
    color: #1d1d1f;
}

.comparison-table tr:hover {
    background: #fbfbfd;
}

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

.side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.side-by-side > div {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
}

.side-by-side p {
    margin: 12px 0;
    font-family: 'SF Mono', Monaco, monospace;
    color: #1d1d1f;
}

.side-by-side p:first-child {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    font-weight: 600;
    color: #0071e3;
    margin-bottom: 16px;
}

footer {
    grid-area: footer;
    background: #1d1d1f;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 24px 60px;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 1024px) {
    footer {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 32px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    header h1 {
        font-size: 1.5em;
    }

    header h2 {
        display: none;
    }
    
    .header-controls {
        flex-direction: row;
        gap: 8px;
        width: 100%;
    }
    
    .search-container {
        min-width: 150px;
    }
    
    .unit-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        min-width: 280px;
    }
    
    .search-results {
        padding: 16px 20px;
    }

    .tab-content {
        padding: 24px;
    }

    .tab-content h3 {
        font-size: 2em;
    }

    .tab-button {
        padding: 14px 16px;
        font-size: 0.95em;
    }
    .side-by-side {
        grid-template-columns: 1fr;
    }

    .comparison-table {
        font-size: 0.9em;
    }
    
    .formula-section h4 {
        font-size: 1.5em;
    }
    
    .graph-controls {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 300px;
        padding: 12px;
    }
    
    .converter-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .converter-row input,
    .converter-row select {
        width: 100%;
    }
}

/* Unit Converter Styles */
.converter {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.converter-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.converter-row input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e5e7;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    min-width: 0;
}

.converter-row input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.converter-row input[readonly] {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    color: #0071e3;
    font-weight: 600;
    cursor: default;
}

.converter-row select {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e5e7;
    border-radius: 10px;
    font-size: 0.95em;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%231d1d1f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    min-width: 0;
}

.converter-row select:hover {
    border-color: #0071e3;
    background-color: #f9fbfd;
}

.converter-row select:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.converter-arrow {
    font-size: 1.5em;
    color: #0071e3;
    font-weight: 600;
    text-align: center;
    padding: 0 8px;
    user-select: none;
}

/* PDF Export Styles */
.pdf-view {
    background: white;
    padding: 40px;
    max-width: 210mm;
    margin: 0 auto;
}

.pdf-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #0071e3;
}

.pdf-header h1 {
    font-size: 2.5em;
    color: #1d1d1f;
    margin-bottom: 8px;
    font-weight: 700;
}

.pdf-header h2 {
    font-size: 1.5em;
    color: #0071e3;
    margin-bottom: 8px;
    font-weight: 600;
}

.pdf-subtitle {
    font-size: 1em;
    color: #6e6e73;
    font-style: italic;
}

#pdfContent {
    font-size: 11pt;
    line-height: 1.6;
}

#pdfContent .pdf-section {
    margin-bottom: 30px;
    page-break-inside: avoid;
}

#pdfContent .pdf-section h3 {
    font-size: 1.5em;
    color: #0071e3;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e5e7;
    font-weight: 600;
}

#pdfContent .pdf-section h4 {
    font-size: 1.2em;
    color: #1d1d1f;
    margin: 20px 0 15px 0;
    font-weight: 600;
}

#pdfContent .pdf-formula-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fbfd;
    border-left: 4px solid #0071e3;
    border-radius: 8px;
    page-break-inside: avoid;
}

#pdfContent .pdf-formula-item h5 {
    font-size: 1.1em;
    color: #1d1d1f;
    margin-bottom: 8px;
    font-weight: 600;
}

#pdfContent .pdf-formula {
    font-size: 1.2em;
    font-family: 'Courier New', monospace;
    color: #0071e3;
    margin: 8px 0;
    font-weight: bold;
}

#pdfContent .pdf-description {
    color: #6e6e73;
    margin: 6px 0;
    font-size: 0.95em;
}

#pdfContent .pdf-unit {
    color: #86868b;
    font-size: 0.9em;
    font-style: italic;
}

#pdfContent .pdf-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    page-break-inside: avoid;
}

#pdfContent .pdf-comparison-table th,
#pdfContent .pdf-comparison-table td {
    padding: 12px;
    border: 1px solid #d2d2d7;
    text-align: left;
}

#pdfContent .pdf-comparison-table th {
    background: #f5f5f7;
    font-weight: 600;
    color: #1d1d1f;
}

#pdfContent .pdf-comparison-table tr:nth-child(even) {
    background: #fbfbfd;
}

.pdf-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e5e5e7;
    color: #86868b;
    font-size: 0.9em;
}

@media print {
    body {
        background: white;
    }
    
    .container {
        display: none;
    }
    
    .pdf-view {
        display: block !important;
    }
    
    .pdf-section {
        page-break-inside: avoid;
    }
    
    .pdf-formula-item {
        page-break-inside: avoid;
    }
}

/* Home Page Styles */
.home-content {
    grid-area: content;
    background: #f5f5f7;
    padding: 0;
    display: flex;
    flex-direction: column;
    margin-top: 0;
    overflow-y: auto;
    height: calc(100vh - 68px - 50px);
}

.hero {
    background: linear-gradient(135deg, #1d1d1f 0%, #2c2c2e 100%);
    color: white;
    padding: 80px 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 1024px) {
    .hero {
        padding: 60px 24px;
        grid-template-columns: 1fr;
    }
}

.hero-content h2 {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5em;
    color: #0071e3;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-description {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #0071e3;
    color: white;
}

.btn-primary:hover {
    background: #0077ed;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.hero-graphic {
    font-size: 200px;
    text-align: center;
    opacity: 0.8;
}

.features {
    padding: 80px 60px;
    background: white;
}

@media (max-width: 1024px) {
    .features {
        padding: 60px 24px;
    }
}

.features h3,
.tools-section h3,
.comparison-section h3,
.about-section h3 {
    font-size: 2.5em;
    color: #1d1d1f;
    margin-bottom: 48px;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.feature-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #e8e8ed;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: #0071e3;
}

.feature-icon {
    font-size: 3.5em;
    margin-bottom: 16px;
}

.feature-card h4 {
    font-size: 1.4em;
    color: #1d1d1f;
    margin-bottom: 16px;
    font-weight: 600;
}

.feature-card p {
    color: #6e6e73;
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.feature-card a {
    color: #0071e3;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
}

.feature-card a:hover {
    color: #0077ed;
    transform: translateX(4px);
}

.tools-section {
    padding: 80px 60px;
    background: #fbfbfd;
}

@media (max-width: 1024px) {
    .tools-section {
        padding: 60px 24px;
    }
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

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

.tool-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #e8e8ed;
}

.tool-card h4 {
    font-size: 1.3em;
    color: #1d1d1f;
    margin-bottom: 12px;
    font-weight: 600;
}

.tool-card p {
    color: #6e6e73;
    font-size: 1em;
    line-height: 1.6;
}

.comparison-section {
    padding: 80px 60px;
    background: white;
}

@media (max-width: 1024px) {
    .comparison-section {
        padding: 60px 24px;
    }
}

.comparison-intro {
    text-align: center;
    color: #6e6e73;
    font-size: 1.1em;
    margin-bottom: 48px;
}

.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

@media (max-width: 768px) {
    .comparison-box {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.comparison-column {
    background: #fbfbfd;
    padding: 40px;
    border-radius: 12px;
    border-left: 4px solid #0071e3;
}

.comparison-column h4 {
    font-size: 1.4em;
    color: #1d1d1f;
    margin-bottom: 24px;
    font-weight: 600;
}

.comparison-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comparison-column li {
    padding: 12px 0;
    color: #1d1d1f;
    font-size: 1em;
    line-height: 1.6;
    border-bottom: 1px solid #e5e5e7;
}

.comparison-column li:last-child {
    border-bottom: none;
}

.comparison-column strong {
    color: #0071e3;
    font-weight: 600;
}

.about-section {
    padding: 80px 60px;
    background: #fbfbfd;
    text-align: center;
}

@media (max-width: 1024px) {
    .about-section {
        padding: 60px 24px;
    }
}

.about-section p {
    font-size: 1.1em;
    color: #6e6e73;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 16px;
}

.about-section p:last-child {
    margin-top: 32px;
    font-size: 1em;
    color: #86868b;
}

footer {
    grid-area: footer;
    background: #1d1d1f;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 24px 60px;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon Styles */
.pdf-icon {
    display: inline-flex;
    align-items: center;
    font-size: 1.2em;
}

.btn i,
.feature-icon i,
.tool-card i,
.feature-card a i,
.hero-graphic i {
    display: inline-block;
    margin-right: 0.3em;
}

.hero-graphic i {
    font-size: 120px;
    color: rgba(255, 255, 255, 0.6);
}

.feature-icon i {
    font-size: 2.5em;
    color: #0071e3;
}

.tool-card i {
    margin-right: 0.5em;
    font-size: 1.2em;
    color: #0071e3;
}
