:root {
    --primary-color: #002E5E;
    --primary-light: #144696;
    --primary-lighter: #1A5EBD;
    --secondary-color: #44638D;
    --secondary-dark: #5A6E82;
    --success-color: #0F6653;
    --success-light: #13856C;
    --danger-color: #BC3345;
    --danger-light: #CD4658;
    --warning-color: #FBD036;
    --warning-light: #FCE782;
    --dark: #000000;
    --dark-gray: #545454;
    --medium-gray: #666666;
    --light-gray: #ABABAB;
    --lighter-gray: #E0E0E0;
    --lightest-gray: #EDEDED;
    --light: #E8F0F0;
    --white: #FFFFFF;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: linear-gradient(to bottom, var(--light), var(--white));
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.nav-brand h1 .ki-highlight {
    color: var(--success-color);
}

.tagline {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    margin: 3px 0;
    transition: var(--transition);
}

.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.parties-section {
    padding: 4rem 0;
}

.parties-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark);
}

.party-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.party-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--lighter-gray);
    transition: var(--transition);
}

.party-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.party-header {
    padding: 1.5rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.party-header h3 {
    font-size: 1.3rem;
    margin: 0;
}

.party-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.party-content {
    padding: 1.5rem;
}

.party-content p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.party-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    transition: var(--transition);
}

.btn-small:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

.chat-section {
    padding: 4rem 0;
    background: var(--lightest-gray);
}

.chat-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.chat-intro {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--lighter-gray);
    overflow: hidden;
}

.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 2rem;
    background: var(--lightest-gray);
}

.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: var(--success-color);
}

.message-content {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    max-width: 70%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid var(--lighter-gray);
}

.user-message .message-content {
    background: var(--primary-color);
    color: var(--white);
    border: none;
}

.message-content ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.chat-input-container {
    padding: 1.5rem;
    background: var(--white);
    border-top: 1px solid var(--lighter-gray);
}

.suggested-questions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.suggestion-chip {
    padding: 6px 12px;
    background: var(--lightest-gray);
    border: 1px solid var(--lighter-gray);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-chip:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

#chatInput {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--lighter-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
}

#chatInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

.send-button {
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.send-button:hover {
    background: var(--primary-light);
}

.compare-section {
    padding: 4rem 0;
}

.compare-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.compare-section > .container > p {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.compare-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.party-select {
    padding: 10px 15px;
    border: 1px solid var(--lighter-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--white);
    font-family: 'Open Sans', sans-serif;
}

.comparison-result {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--lighter-gray);
    min-height: 200px;
}

.about-section {
    padding: 4rem 0;
    background: var(--lightest-gray);
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about-content > p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid var(--lighter-gray);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.feature p {
    color: var(--secondary-color);
}

.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.disclaimer {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 2% auto;
    padding: 20px;
    border-radius: var(--border-radius);
    width: 90%;
    height: 90%;
    border: 2px solid var(--primary-color);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--dark);
}

#pdfViewer {
    width: 100%;
    height: calc(100% - 40px);
    border: none;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Analysis page styles */
.analysis-content {
    max-width: 900px;
    margin: 0 auto;
}

.analysis-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid var(--lighter-gray);
}

.analysis-content h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.analysis-content h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.analysis-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.analysis-content li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .party-grid {
        grid-template-columns: 1fr;
    }
    
    .compare-selector {
        flex-direction: column;
    }
    
    .party-select {
        width: 100%;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .suggested-questions {
        display: none;
    }
    
    .analysis-section {
        padding: 1rem;
    }
}