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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f6f0;
    color: #2c2c2c;
    line-height: 1.6;
}

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

header {
    background-color: #faf8f2;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 3px solid #50c9a5;
}

.header-content {
    position: relative;
}

header h1 {
    text-align: center;
    color: #50c9a5;
    font-size: 2em;
    margin: 0;
}

.portfolio-attribution {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1em;
    color: #2c2c2c;
}

.portfolio-link {
    color: #50c9a5;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.portfolio-link:hover {
    color: #f5c542;
}

.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 0;
    background: none;
    color: #50c9a5;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: color 0.2s ease;
    text-decoration: underline;
    display: inline-block;
}

.tab-button:hover {
    color: #f5c542;
}

.tab-button.active {
    color: #5b9bd5;
    font-weight: bold;
}

.content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    min-height: 500px;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.section-title {
    color: #50c9a5;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.input-section {
    background-color: #f0ede5;
    padding: 20px;
    border-radius: 5px;
}

.results-section {
    background-color: #f0ede5;
    padding: 20px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

.results-section .section-title {
    flex-shrink: 0;
}

.results-content {
    overflow-y: auto;
}

@media (max-width: 768px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
}

/* Potion Card Styles */
.potion-card {
    background-color: #ffffff;
    border: 1px solid #e0ddd5;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.potion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(80, 201, 165, 0.15);
}

.potion-card h3 {
    color: #50c9a5;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.potion-value {
    color: #5b9bd5;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.ingredients {
    color: #666666;
    margin-bottom: 10px;
    font-style: italic;
}

.effects-list {
    margin-top: 10px;
}

.effect {
    padding: 5px 0;
    font-size: 0.95em;
}

.effect.poison {
    color: #d63031;
}

.effect.beneficial {
    color: #50c9a5;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner .spinner {
    border: 4px solid #e0ddd5;
    border-top: 4px solid #50c9a5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-spinner p {
    color: #666666;
    font-size: 1.1em;
}

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

/* Error Message */
.error-message {
    background-color: #ffe8e8;
    border: 1px solid #d63031;
    border-radius: 5px;
    padding: 20px;
    margin: 20px;
    color: #d63031;
    text-align: center;
}

.error-message strong {
    color: #c0392b;
}

/* Range Slider Styles */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e0ddd5;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #50c9a5;
    cursor: pointer;
    transition: background 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #3fb593;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #50c9a5;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #3fb593;
}

input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #e0ddd5;
}
