/* --- Global & Font Styles --- */
.cpc-app-wrapper * {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

.cpc-app-wrapper {
    max-width: 850px;
    margin: 40px auto;
    padding: 20px;
    /* ATTRACTIVE GRADIENT BACKGROUND FOR THE TOOL */
    background: linear-gradient(135deg, #e0f7fa 0%, #f0f8ff 100%); 
    border-radius: 15px;
}

/* --- Header Styles --- */
.cpc-app-header {
    text-align: center;
    margin-bottom: 30px;
}

/* H1/cpc-main-heading removed */

.cpc-sub-heading {
    /* Adjusted styling for the sub-heading to stand out more as the main header */
    font-size: 1.5em; 
    font-weight: 600; 
    color: #1a2a47; /* Deep Navy Blue */
    margin-top: 5px;
}

.cpc-area-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #1a2a47;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e9ecef;
}

/* --- Main Card --- */
.cpc-content-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* --- Input Area --- */
.cpc-input-area {
    margin-bottom: 30px;
}

.cpc-form-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cpc-input-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.cpc-input-group label {
    display: block;
    text-align: left;
    margin-bottom: 8px;
    font-weight: 600;
    color: #3d5170;
    font-size: 0.9em;
}

.cpc-input-group input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    color: #1a2a47;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.cpc-input-group input[type="number"]:focus {
    border-color: #007bff; /* Primary Blue focus */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
}

/* --- Buttons --- */
.cpc-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.cpc-btn {
    width: 200px;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.2s;
}

.cpc-btn-calculate {
    background-color: #2ecc71; /* Green */
    color: white;
}

.cpc-btn-calculate:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.4);
}

.cpc-btn-clear {
    background-color: #e74c3c; /* Red */
    color: white;
}

.cpc-btn-clear:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
}

/* --- Results Section --- */
.cpc-results-section {
    opacity: 0;
    height: 0;
    overflow: hidden;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
    transition: opacity 0.5s ease-out, height 0.5s ease-out;
}

.cpc-results-section.cpc-results-visible {
    opacity: 1;
    height: auto;
    overflow: visible;
}

/* Pivot Point Box */
.cpc-pp-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fffac2; /* Light Yellow for PP */
    border: 1px solid #ffcc00;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 700;
}

.cpc-pp-label {
    color: #8b6b00; /* Darker text for contrast */
}

.cpc-pp-value {
    color: #ffcc00;
    background-color: #8b6b00; /* Inverted look for value */
    padding: 5px 10px;
    border-radius: 5px;
}

/* Levels Grid */
.cpc-levels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.cpc-group-heading {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
}

/* RESISTANCE - RED */
.cpc-resistance .cpc-group-heading {
    background-color: #e74c3c; /* Bright Red background for Resistance */
    color: white;
}
.cpc-resistance .cpc-level-item { background-color: #ffeaea; } /* Light Red BG */
.cpc-resistance .cpc-label { color: #c0392b; }
.cpc-resistance .cpc-value { color: #e74c3c; }

/* SUPPORT - GREEN */
.cpc-support .cpc-group-heading {
    background-color: #2ecc71; /* Green background for Support */
    color: white;
}
.cpc-support .cpc-level-item { background-color: #e9fff3; } /* Light Green BG */
.cpc-support .cpc-label { color: #27ae60; }
.cpc-support .cpc-value { color: #2ecc71; }


.cpc-level-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns within each group */
    gap: 15px;
}

.cpc-level-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.3s;
}

.cpc-level-item:hover {
    transform: translateY(-3px); /* Hover Effect */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.cpc-label {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 5px;
}

.cpc-value {
    font-size: 1.3em;
    font-weight: 800;
}


/* --- Footer (Disclaimer Highlight) --- */
.cpc-app-footer {
    margin-top: 30px;
    padding: 20px 25px; 
    border-radius: 8px; 
    
    /* HIGHLIGHTED DISCLAIMER STYLES */
    background-color: #fff3cd; 
    border: 1px solid #ffeeba;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.1); 
}

.cpc-app-footer p {
    font-size: 1em; 
    color: #856404; 
    font-weight: 600; 
    text-align: center;
    line-height: 1.5;
    margin: 0; 
}

/* --- Media Queries for Mobile Responsiveness --- */
@media (max-width: 768px) {
    .cpc-app-wrapper {
        padding: 10px;
    }
    .cpc-sub-heading {
        font-size: 1.3em; /* Adjusted for mobile */
    }
    .cpc-input-row {
        grid-template-columns: 1fr;
        gap: 15px; 
    }
    .cpc-levels-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* FIX: Mobile Level Layout - Changed to 2 columns */
    .cpc-level-list {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    
    .cpc-level-item {
        padding: 12px 5px; 
    }
    .cpc-label {
        font-size: 1em; 
    }
    .cpc-value {
        font-size: 1.2em; 
    }
    
    .cpc-actions {
        flex-direction: column;
        gap: 10px;
    }
    .cpc-btn {
        width: 100%;
    }
    .cpc-app-footer {
        padding: 15px;
    }
    /* FIX: Stack PP label and value on small screens */
    .cpc-pp-box {
        flex-direction: column; 
        align-items: center;
        padding: 15px 10px;
    }
    .cpc-pp-label {
        margin-bottom: 5px;
    }
}