:root {
    --coke-red: #F40009;
    --pepsi-blue: #004B93;
    --background-color: #f0f2f5;
    --card-background: #ffffff;
    --text-color: #333;
    --light-text-color: #666;
    --border-color: #e0e0e0;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

header h1 {
    font-size: 2rem;
    font-weight: 300;
    color: var(--light-text-color);
    margin: 0;
}

header h2 {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--light-text-color);
    margin: 0;
}

main {
    padding: 2rem 1rem;
    max-width: 900px;
    margin: 0 auto;
}

#analysis-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.category-card {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards;
}

.category-card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-color);
}

.graph-container {
    width: 100%;
}

.bar-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.brand-label {
    width: 80px;
    font-weight: 500;
}

.bar {
    height: 30px;
    line-height: 30px;
    color: white;
    font-weight: bold;
    text-align: right;
    padding-right: 10px;
    box-sizing: border-box;
    border-radius: 0 4px 4px 0;
    transition: width 1s ease-in-out;
}

.coke-bar {
    background-color: var(--coke-red);
}

.pepsi-bar {
    background-color: var(--pepsi-blue);
}

.ai-summary {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-style: italic;
    color: var(--light-text-color);
    font-size: 0.9rem;
    text-align: center;
}

.loader {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    width: 100%;
    grid-column: 1;
}

.loader p {
    font-size: 1.1rem;
    color: var(--light-text-color);
    margin-bottom: 1rem;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--pepsi-blue);
    animation: spin 1s ease infinite;
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: var(--light-text-color);
}

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

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

@media (min-width: 768px) {
    #analysis-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .overall-winner {
        grid-column: 1 / -1;
    }
}

