:root {
    --font-sans: "Inter", sans-serif;
    --text-color: rgb(25, 25, 24);
    --bg-color: #fafafa;
    --border-color: rgba(55, 53, 47, 0.12);
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-32) var(--space-24);
}

/* ========== APP HEADER ========== */
.app-header {
    text-align: center;
    margin-bottom: var(--space-24);
    padding: var(--space-16) var(--space-24);
    margin: calc(-1 * var(--space-32)) calc(-1 * var(--space-24)) var(--space-24);
}

.app-header__title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-color);
    margin: 0;
    padding-bottom: var(--space-16);
}

.app-header__title::after {
    content: "";
    display: block;
    width: 40%;
    height: 1px;
    background: var(--border-color);
    margin: var(--space-16) auto 0;
}

h2 {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-top: 48px;
    margin-bottom: 24px;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.35;
    margin-top: 32px;
    margin-bottom: 12px;
}

p {
    font-size: 18px;
    color: rgba(25, 25, 24, 0.9);
    margin-bottom: 16px;
}

/* Buttons */
.primary-btn {
    font-size: 16px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 50px;
    background: #000000;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    font-family: "Inter";
}

.primary-btn:hover:not(:disabled) {
    background: #1a1a1a;
}

.primary-btn:active:not(:disabled) {
    background: #333333;
}

.primary-btn:disabled {
    background: rgba(0, 0, 0, 0.3);
    opacity: 0.5;
    cursor: not-allowed;
}

.secondary-btn {
    font-size: 16px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(55, 53, 47, 0.08);
    color: rgb(25, 25, 24);
    border: none;
    cursor: pointer;
}

.secondary-btn:hover {
    background: rgba(55, 53, 47, 0.16);
}

/* Input Section */
.input-section {
    background: #fbfbfa;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 48px;
    border: 0.5px solid rgba(55, 53, 47, 0.16);
}

.search-container label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(25, 25, 24, 0.6);
}

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

input[type="text"] {
    flex: 1;
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 0.5px solid rgba(55, 53, 47, 0.16);
    outline: none;
}

input[type="text"]:focus {
    border-color: #2383E2;
    box-shadow: 0 0 0 2px rgba(35, 131, 226, 0.2);
}

.selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.company-tag {
    display: flex;
    align-items: center;
    background: rgba(55, 53, 47, 0.08);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 14px;
}

.remove-btn {
    background: none;
    border: none;
    margin-left: 6px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
}

.remove-btn:hover {
    opacity: 1;
}

.action-container {
    text-align: center;
    margin-top: 24px;
}

/* Results Section */
.hidden {
    display: none;
}

.loader-container {
    text-align: center;
    padding: 48px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(35, 131, 226, 0.2);
    border-top: 4px solid #2383E2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Comparison Layout */
.company-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.company-column {
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    border: 0.5px solid rgba(55, 53, 47, 0.16);
}

.company-column h2 {
    font-size: 28px;
    margin-top: 0;
    border-bottom: 1px solid #2383E2;
    padding-bottom: 12px;
}

.section-card {
    margin-bottom: 24px;
}

.section-card h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(25, 25, 24, 0.5);
    margin-bottom: 8px;
}

.section-content {
    font-size: 16px;
    white-space: pre-wrap;
}

/* Summary Table */
.summary-section {
    margin-top: 64px;
    border-top: 0.5px solid rgba(55, 53, 47, 0.16);
    padding-top: 48px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 0.5px solid rgba(55, 53, 47, 0.16);
}

.comparison-table th {
    font-weight: 600;
    color: rgba(25, 25, 24, 0.6);
    background: #fbfbfa;
}

/* Footer */
.footer {
    margin-top: 80px;
    text-align: center;
    font-size: 14px;
    color: rgba(25, 25, 24, 0.4);
}

@media (max-width: 768px) {
    .container {
        padding: var(--space-24) var(--space-16);
    }

    .app-header {
        padding: var(--space-12) var(--space-16);
        margin: calc(-1 * var(--space-24)) calc(-1 * var(--space-16)) var(--space-20);
    }

    .app-header__title {
        font-size: 28px;
    }
}