/* Scoped styles with GeneratePress compatibility */
.gp-ideal-gas-calculator {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f0f7ff, #e6e6fa); /* Soft blue-purple gradient */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: inherit; /* Inherit GeneratePress typography */
    position: relative;
    overflow: hidden;
}

/* Animated background effect */
.gp-ideal-gas-calculator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0.3;
    z-index: 0;
}

.gp-ideal-gas-calculator > * {
    position: relative;
    z-index: 1;
}

.gp-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(45deg, #8b5cf6, #ec4899); /* Vibrant purple-pink gradient */
    border-radius: 10px;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.gp-header:hover {
    transform: translateY(-5px);
}

.gp-ideal-gas-calculator h1 {
    font-size: 28px;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gp-formula {
    text-align: center;
    margin: 1rem 0;
    font-size: 1.2rem;
    color: #4b5563;
    font-style: italic;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 8px;
    display: inline-block;
    width: auto;
}

.gp-formula-icon {
    margin-right: 8px;
    font-size: 1.3rem;
}

.gp-form-group {
    margin-bottom: 20px;
}

.gp-input-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gp-input-box label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1f2937;
    font-size: 1.1rem;
}

.gp-icon {
    margin-right: 8px;
    color: #8b5cf6;
    font-size: 1.2rem;
}

.gp-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.gp-input-row input,
.gp-input-row select {
    width: 100%;
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.gp-input-row input:focus,
.gp-input-row select:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
    outline: none;
    transform: scale(1.02);
}

.gp-input-row input:hover,
.gp-input-row select:hover {
    border-color: #ec4899;
}

.gp-input-row select.unit {
    flex: 0 0 100px;
    background: #f3e8ff;
    color: #4b5563;
}

.gp-control-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.gp-calculate-btn,
.gp-reset-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.gp-calculate-btn {
    background: linear-gradient(45deg, #8b5cf6, #ec4899);
    color: #ffffff;
}

.gp-calculate-btn:hover {
    background: linear-gradient(45deg, #7c3aed, #db2777);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.4);
}

.gp-reset-btn {
    background: linear-gradient(45deg, #6b7280, #9ca3af);
    color: #ffffff;
}

.gp-reset-btn:hover {
    background: linear-gradient(45deg, #4b5563, #6b7280);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(107, 114, 128, 0.4);
}

.gp-result-wrapper {
    perspective: 1000px;
}

.gp-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    background: #ffffff;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: rotateY(10deg);
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.gp-result.show {
    display: block;
    transform: rotateY(0);
    opacity: 1;
}

.gp-result h2 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #1f2937;
    display: flex;
    align-items: center;
}

.gp-result p {
    margin-bottom: 10px;
    font-size: 18px;
    color: #4b5563;
    font-weight: 500;
}

.gp-gas-info {
    margin-top: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #e6f3ff, #fef3ff);
    border-radius: 8px;
    border-left: 4px solid #8b5cf6;
    font-size: 14px;
    color: #374151;
}

/* Responsive design */
@media (max-width: 768px) {
    .gp-ideal-gas-calculator {
        padding: 20px;
        margin: 0 15px 30px;
    }

    .gp-ideal-gas-calculator h1 {
        font-size: 24px;
    }

    .gp-input-group {
        grid-template-columns: 1fr;
    }

    .gp-control-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .gp-input-row select.unit {
        flex: 0 0 80px;
    }
}

/* Animation for inputs appearing */
@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gp-input-box {
    animation: slideIn 0.5s ease forwards;
    animation-delay: calc(var(--order) * 0.1s);
}

.gp-input-box:nth-child(1) { --order: 1; }
.gp-input-box:nth-child(2) { --order: 2; }
.gp-input-box:nth-child(3) { --order: 3; }
.gp-input-box:nth-child(4) { --order: 4; }