@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    background: white;
    min-height: 100vh;
    padding: 2rem 1rem;
    color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main container styles */
.profile-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    text-align: center;
}

/* Typography */
.profile-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

/* Button container */
.button-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}
    /* Comparison column header layout */
    .col-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .remove-col-btn {
        cursor: pointer;
        color: #007bff;
        text-decoration: underline;
        margin-left: 1rem;
    }

/* Button styles */
.link-button {
    background: #0075be;
    color: #ffffff;
    padding: 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.link-button:hover {
    background: #005081;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive styles */
@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .profile-container {
        padding: 1rem;
    }

    .profile-container h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .link-button {
        padding: 0.875rem;
    }
}

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 42rem;
    margin: 0 auto;
}

h1 {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 700;
    text-align: center;
    color: #1f2937;
    margin: 0;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.nav-link:hover {
    color: #2563eb;
    background: #f3f4f6;
}

.nav-link i {
    font-size: 1.125rem;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    margin: -1rem 0 2rem;
    font-size: 1.125rem;
}


.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.input-group {
    margin: 0;
    position: relative;
    padding-bottom: 2rem;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    margin-top: 0.5rem;
}

.input-label {
    display: block;
    color: #374151;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-field {
    width: 100%;
    max-width: 420px;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #d1d5db;
    transition: all 0.2s;
    font-size: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.2);
}

.input-field::placeholder {
    color: #9ca3af;
}

.error-message {
    font-size: 0.875rem;
    color: #ef4444;
    position: absolute;
    top: calc(100% - 1.5rem);
    left: 0;
    margin-top: 0.25rem;
}

.btn {
    width: 100%;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
}

.btn i {
    font-size: 1.125rem;
}

.btn-primary {
    background-color: #0050fc;
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #1f2937;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* History page styles */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    position: relative;
    min-width: 200px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #3b82f6;
}

.filter-options {
    display: flex;
    gap: 0.5rem;
}

.filter-select, .filter-button {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.history-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.history-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.2s;
}

.history-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.history-card-header {
    padding: 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timestamp {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.yield-badge {
    background: #ecfdf5;
    color: #059669;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.history-card-content {
    padding: 1rem;
}

.input-summary, .result-summary {
    display: grid;
    gap: 0.75rem;
}

.input-item, .result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4b5563;
}

.input-item i, .result-item i {
    color: #6b7280;
    width: 1rem;
    text-align: center;
}

.history-card-footer {
    padding: 1rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
}

.card-action-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 0.5rem;
    background: #e5e7eb;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.card-action-btn:hover {
    background: #d1d5db;
}

.card-action-btn.delete {
    color: #dc2626;
    background: #fee2e2;
}

.card-action-btn.delete:hover {
    background: #fecaca;
}

/* Comparison page styles */
.comparison-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .comparison-container {
        grid-template-columns: 1fr;
    }
}

.comparison-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comparison-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background: white;
    transition: all 0.2s;
}

.comparison-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.comparison-details {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
}

.calc-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calc-details h4 {
    color: #374151;
    margin: 0.5rem 0;
    font-weight: 600;
}

.calc-details p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4b5563;
    margin: 0;
}

.calc-details i {
    color: #6b7280;
    width: 1rem;
    text-align: center;
}

.difference-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.difference-details {
    display: grid;
    gap: 1rem;
}

.difference-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    align-items: center;
}

.difference-item.highlight {
    background: #fffbeb;
    border: 1px solid #fbbf24;
}

.difference-label {
    font-weight: 500;
    color: #374151;
}

.difference-value {
    text-align: center;
    color: #4b5563;
}

.difference-change {
    text-align: right;
    font-weight: 600;
}

.difference-change.positive {
    color: #059669;
}

.difference-change.negative {
    color: #dc2626;
}

.empty-message {
    color: #6b7280;
    text-align: center;
    padding: 2rem;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Confirmation Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.modal-header i {
    color: #dc2626;
    font-size: 1.5rem;
}

.modal-header h3 {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.modal-btn.cancel {
    background: #f3f4f6;
    color: #374151;
}

.modal-btn.cancel:hover {
    background: #e5e7eb;
}

.modal-btn.delete {
    background: #dc2626;
    color: white;
}

.modal-btn.delete:hover {
    background: #b91c1c;
}

/* Download Options Modal */
.download-options {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.download-option {
    flex: 1;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.download-option:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.download-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.download-option i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #4b5563;
}

.download-option.txt i {
    color: #059669;
}

.download-option.pdf i {
    color: #dc2626;
}

.download-option h4 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.download-option p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.hidden {
    display: none;
}
