/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.back-link {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.back-link a {
    color: #007AFF;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Buttons */
.cta-button {
    background: #007AFF;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background: #0056b3;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 2rem;
}

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

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

.continue-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.2s ease;
}

.continue-button:hover {
    background-color: #0056b3;
}

.warning-message {
    background-color: #fff3cd;
    color: #856404;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    border: 1px solid #ffeeba;
    font-size: 0.9rem;
}

.laptop-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
}

.laptop-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.laptop-item:hover {
    background-color: #f5f7fa;
}

.laptop-item img {
    width: 60px;
    margin-right: 1rem;
}

.laptop-item.selected {
    background-color: #e3f2fd;
    border-color: #007AFF;
}

.laptop-item.attempted-selection {
    background-color: #ffebee;
    border-color: #f44336;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Comparison Section */
.comparison-table-wrapper {
    margin: 2rem 0;
    width: 100%;
}

#comparisonTable {
    width: 100%;
    height: 600px;
}

.ag-theme-alpine {
    --ag-header-background-color: #f5f7fa;
    --ag-odd-row-background-color: #ffffff;
    --ag-even-row-background-color: #fafafa;
    --ag-row-hover-color: #e3f2fd;
    --ag-header-foreground-color: #333;
    --ag-foreground-color: #333;
    --ag-border-color: #eee;
    --ag-row-border-color: #eee;
    --ag-font-size: 14px;
    --ag-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ag-theme-alpine .ag-header {
    font-weight: 600;
}

.ag-theme-alpine .ag-cell {
    padding: 1rem;
    line-height: 1.5;
}

.ag-theme-alpine .ag-cell a {
    color: #007AFF;
    text-decoration: none;
}

.ag-theme-alpine .ag-cell a:hover {
    text-decoration: underline;
}

/* Scatter Plot */
.scatter-plot-container {
    margin: 2rem 0;
    min-height: 400px;
    position: relative;
}

.scatter-plot-container svg {
    width: 100%;
    height: 400px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.scatter-plot-container .grid line {
    stroke: #eee;
    stroke-dasharray: 2,2;
}

.scatter-plot-container .grid path {
    stroke-width: 0;
}

.scatter-plot-container .tooltip rect {
    fill: white;
    stroke: #ccc;
    stroke-width: 1;
}

.scatter-plot-container .tooltip text {
    font-size: 12px;
    fill: #333;
}

.loading-message,
.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.error-message {
    color: #dc3545;
    padding: 1rem;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

canvas {
    width: 100%;
    max-height: 400px;
}

/* Final CTA Section */
.final-cta {
    background: linear-gradient(135deg, #007AFF 0%, #0056b3 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.trust-elements {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.trust-item {
    text-align: center;
}

.trust-item .number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.trust-item .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .trust-elements {
        gap: 1rem;
    }

    .trust-item .number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 1rem;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

.wrap-header {
    white-space: normal !important;
    line-height: 1.2 !important;
    padding: 10px !important;
    height: auto !important;
    text-align: center !important;
}

.wrap-header .ag-header-cell-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.wrap-header .ag-header-cell-text {
    white-space: normal;
    line-height: 1.2;
    text-align: center;
}

.wrap-cell {
    white-space: normal !important;
    line-height: 1.4 !important;
    padding: 10px !important;
    height: auto !important;
    text-align: left !important;
    vertical-align: top !important;
}

.ag-theme-alpine .ag-cell {
    white-space: normal !important;
    line-height: 1.4 !important;
    padding: 10px !important;
}

.ag-theme-alpine .ag-row {
    min-height: 50px !important;
}

.ag-theme-alpine .ag-cell-wrapper {
    height: 100% !important;
    display: flex !important;
    align-items: flex-start !important;
}

.ag-theme-alpine .ag-cell-value {
    height: 100% !important;
    display: flex !important;
    align-items: flex-start !important;
} 