@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

body {
    margin: 0 auto;
    background: linear-gradient(135deg, #f6f8ff 0%, #e9f0ff 100%);
    color: #2d3748;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
    padding: 2rem;
    min-height: 100vh;
}

#ppf {
    display: block;
    margin: 0 auto;
    border: 2px solid rgba(99, 179, 237, 0.5);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    backdrop-filter: blur(4px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#ppf:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2);
}

#graphhead {
    text-align: center;
    font-size: 2.5rem;
    margin: 2rem auto;
    color: #2b6cb0;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideIn 1s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.label {
    font-family: Arial, sans-serif;
    font-size: 15px;
    fill: blue;
}

.ceteris-paribus {
    text-align: center;
    font-family: Arial;
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
}

h1 {
    text-align: center;
    margin: 0 auto;
    text-transform: capitalize;
    text-decoration: underline;
    font-size: 40px;
}

.input-container {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    margin-top: 20px;
}

.input-container input {
    width: 200px;
    padding: 5px;
}

.draw-button {
    text-align: center;
    margin-top: 10px;
}

.draw-button button {
    padding: 12px 24px;
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.draw-button button:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.draw-button button:active {
    transform: translateY(5px);
    background-color: cyan;
}

.grid-line-x {
    stroke: white;
    stroke-dasharray: 5, 5;
    display: none;
}

.grid-line-y {
    stroke: white;
    stroke-dasharray: 5, 5;
    display: none;
}

.breathing-dot {
    animation: breathe 1.5s infinite alternate ease-in-out;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
}

@keyframes breathe {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.2);
    }
}

#table {
    background-color: rgba(255, 255, 255, 0.95);
    color: #2d3748;
    border-collapse: separate;
    border-spacing: 0;
    width: 35%;
    margin: 2rem auto;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.8s ease-out;
}

#table td, #table th {
    border: 1px solid #e2e8f0;
    padding: 1rem;
    transition: background-color 0.2s ease;
}

#table td:hover {
    background-color: #f7fafc;
}

#table th {
    background-color: #f1f1f1;
    color: aqua;
    text-align: left;
    font-size: larger;
}

input {
    text-align: center;
    background-color: #fff;
    color: #2d3748;
    font-weight: 500;
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

input:hover {
    border-color: #90cdf4;
}

input[type=number] {
    margin-left: 7px;
    background-color: #fff;
}

#placeholder {
    color: white;
}

#head {
    background-color: blue;
    color: white;
    margin-top: 0%;
}

#keyhead {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    font-size: 1.8rem;
    color: #2d3748;
    font-weight: 600;
}

#list {
    font-size: 40px;
}

#watermark {
    color: #718096;
    text-align: center;
    font-size: 0.9rem;
    margin: 0.5rem;
    opacity: 0.8;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.8;
    }
}

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

.input-section {
    margin: 2rem 0;
    animation: slideIn 0.8s ease-out;
}

.graph-section {
    margin: 3rem 0;
    animation: fadeIn 1s ease-out;
}

.graph-container {
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    backdrop-filter: blur(4px);
}

.legend-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 2rem auto;
    max-width: 800px;
    animation: slideIn 1.2s ease-out;
}

.legend-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 1rem;
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-item:hover {
    transform: translateX(5px);
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-dot.boundary { background-color: #2b6cb0; }
.legend-dot.unattainable { background-color: #e53e3e; }
.legend-dot.favorable { background-color: #00b5d8; }
.legend-dot.unfavorable { background-color: #2b6cb0; }

.primary-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.button-icon {
    transition: transform 0.3s ease;
}

.primary-button:hover .button-icon {
    transform: rotate(45deg);
}

.footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}